home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-06-03 | 124.7 KB | 5,132 lines |
- *** 1.41 1992/04/13 15:53:11
- --- PatchLev.h 1992/06/03 15:26:53
- ***************
- *** 1,5 ****
-
- ! #define PatchLevel "80"
-
- /*
- *
- --- 1,5 ----
-
- ! #define PatchLevel "81"
-
- /*
- *
- *** 1.7 1992/01/29 21:08:08
- --- aesbind.h 1992/06/03 15:26:54
- ***************
- *** 6,12 ****
- # include <compiler.h>
- #endif
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 6,12 ----
- # include <compiler.h>
- #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 149,155 ****
- __EXTERN int rc_intersect __PROTO((GRECT *r1, GRECT *r2));
- __EXTERN int *grect_to_array __PROTO((GRECT *area, int *array));
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 149,155 ----
- __EXTERN int rc_intersect __PROTO((GRECT *r1, GRECT *r2));
- __EXTERN int *grect_to_array __PROTO((GRECT *area, int *array));
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.1 1991/06/23 17:12:30
- --- alloc.h 1992/06/03 15:26:54
- ***************
- *** 1,44 ****
- ! #ifndef _MEMORY_H
- ! #define _MEMORY_H
-
- ! #ifndef _COMPILER_H
- ! #include <compiler.h>
- ! #endif
- !
- ! #if defined(__cplusplus)
- ! extern "C" {
- ! #endif
- !
- ! #ifndef _SIZE_T
- ! #define _SIZE_T __SIZE_TYPEDEF__
- ! typedef _SIZE_T size_t;
- ! #endif
- !
- ! #ifdef __GNUC__
- ! # ifndef alloca
- ! # define alloca __builtin_alloca
- ! # endif
- ! #endif
- !
- ! __EXTERN void *malloc __PROTO((size_t n));
- ! __EXTERN void free __PROTO((void *param));
- ! __EXTERN void *realloc __PROTO((void *_r, size_t n));
- ! __EXTERN void *calloc __PROTO((size_t n, size_t sz));
- ! __EXTERN void _malloczero __PROTO((int yes));
- ! __EXTERN void _mallocChunkSize __PROTO((size_t siz));
- ! #ifndef alloca
- ! # ifndef __cplusplus
- ! __EXTERN void *alloca __PROTO((size_t));
- ! # else
- ! __EXTERN void *alloca __PROTO((long unsigned int));
- ! # endif
- ! #endif
- ! __EXTERN void *mlalloc __PROTO((long));
- ! __EXTERN void *relalloc __PROTO((void *, long));
- ! __EXTERN void *clalloc __PROTO((long, long));
- !
- ! #if defined(__cplusplus)
- ! }
- ! #endif
- !
- ! #endif /* _MEMORY_H */
- --- 1,6 ----
- ! #ifndef _ALLOC_H
- ! #define _ALLOC_H
-
- ! #include <memory.h>
- !
- ! #endif /* _ALLOC_H */
- *** 1.11 1992/03/06 19:29:17
- --- assert.h 1992/06/03 15:26:54
- ***************
- *** 12,33 ****
- #include <compiler.h>
- #endif
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
-
- ! __EXTERN void __eprintf __PROTO((const char *, const char *, const long,
- ! const char *));
- __EXTERN __EXITING abort __PROTO((void));
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- - #ifndef __FAILED
- - #define __FAILED "assertion `%s' failed at line '%ld' of file %s\n"
- - #endif
-
- #ifdef NDEBUG
- #define assert(cond)
- --- 12,30 ----
- #include <compiler.h>
- #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
-
- ! __EXTERN void __eprintf __PROTO((const char *expression, const long line,
- ! const char *filename));
- __EXTERN __EXITING abort __PROTO((void));
-
- ! #ifdef __cplusplus
- }
- #endif
-
-
- #ifdef NDEBUG
- #define assert(cond)
- ***************
- *** 37,47 ****
- #if __STDC__
- #define assert(cond) \
- if(!(cond)) \
- ! { __eprintf( __FAILED, #cond,(long)(__LINE__), __FILE__); abort(); }
-
- #define assertval(cond) \
- ((cond) ? 1 : \
- ! ( __eprintf( __FAILED, #cond,(long)(__LINE__), __FILE__), abort(), 0 ))
- #else
-
-
- --- 34,44 ----
- #if __STDC__
- #define assert(cond) \
- if(!(cond)) \
- ! { __eprintf(#cond,(long)(__LINE__), __FILE__); abort(); }
-
- #define assertval(cond) \
- ((cond) ? 1 : \
- ! ( __eprintf(#cond,(long)(__LINE__), __FILE__), abort(), 0 ))
- #else
-
-
- ***************
- *** 60,70 ****
-
- #define assert(cond) \
- if(!(cond)) \
- ! { __eprintf(__FAILED, "cond", (long)(__LINE__), __FILE__); abort(); }
-
- #define assertval(cond) \
- ((cond) ? 1: \
- ! ( __eprintf(__FAILED, "cond", (long)(__LINE__), __FILE__), abort(), 0))
-
- #endif /* __STDC__ */
-
- --- 57,67 ----
-
- #define assert(cond) \
- if(!(cond)) \
- ! { __eprintf("cond", (long)(__LINE__), __FILE__); abort(); }
-
- #define assertval(cond) \
- ((cond) ? 1: \
- ! ( __eprintf("cond", (long)(__LINE__), __FILE__), abort(), 0))
-
- #endif /* __STDC__ */
-
- *** 1.7 1991/12/26 16:23:20
- --- basepage.h 1992/06/03 15:26:54
- ***************
- *** 5,11 ****
- #ifndef _BASEP_H
- #define _BASEP_H
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 5,11 ----
- #ifndef _BASEP_H
- #define _BASEP_H
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 38,44 ****
-
- extern BASEPAGE *_base;
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 38,44 ----
-
- extern BASEPAGE *_base;
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.6 1992/04/13 15:53:11
- --- compiler.h 1992/06/03 15:26:54
- ***************
- *** 68,102 ****
-
- #ifndef __NULL
- # ifdef __MSHORT__
- ! # define __NULL ((void *)0L)
- # else
- ! /* avoid complaints about misuse of NULL :-)*/
- # define __NULL (0)
- # endif
- #endif
-
- ! #if __STDC__ || defined(__cplusplus)
- ! # ifndef __NO_PROTO__
- ! # define __PROTO(x) x
- ! # endif
- # define __EXTERN
- #else
- ! # define __EXTERN extern
- /*
- * fudge non-ANSI compilers to be like ANSI
- */
- ! # define const
- ! # define volatile
-
- ! # ifdef __NEED_VOID__
- typedef char void; /* so that (void *) is the same as (char *) */
- /* also lets us know that foo() {...} and void foo() {...} are
- different */
- ! # endif
- ! #endif /* __STDC__ */
-
- #ifndef __PROTO
- #define __PROTO(x) ()
- #endif
-
- #endif /* _COMPILER_H */
- --- 68,112 ----
-
- #ifndef __NULL
- # ifdef __MSHORT__
- ! # define __NULL ((void *)0)
- # else
- ! /* avoid complaints about misuse of NULL :-) */
- # define __NULL (0)
- # endif
- #endif
-
- ! #ifdef __cplusplus
- # define __EXTERN
- + # define __PROTO(x) x
- #else
- ! # ifdef __STDC__
- ! # ifndef __NO_PROTO__
- ! # define __PROTO(x) x
- ! # endif
- ! # define __EXTERN
- ! # else
- ! # define __EXTERN extern
- /*
- * fudge non-ANSI compilers to be like ANSI
- */
- ! # define const
- ! # define volatile
-
- ! # ifdef __NEED_VOID__
- typedef char void; /* so that (void *) is the same as (char *) */
- /* also lets us know that foo() {...} and void foo() {...} are
- different */
- ! # endif
- ! # endif /* __STDC__ */
- ! #endif /* __cplusplus */
-
- #ifndef __PROTO
- #define __PROTO(x) ()
- #endif
- +
- + /* macros for POSIX support */
- + #define _UID_T unsigned short
- + #define _GID_T unsigned short
- + #define _PID_T int
-
- #endif /* _COMPILER_H */
- *** 1.11 1992/03/06 19:29:17
- --- ctype.h 1992/06/03 15:26:55
- ***************
- *** 9,15 ****
- #include <compiler.h>
- #endif
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 9,15 ----
- #include <compiler.h>
- #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 83,89 ****
- __EXTERN int toupper __PROTO((int));
- __EXTERN int tolower __PROTO((int));
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 83,89 ----
- __EXTERN int toupper __PROTO((int));
- __EXTERN int tolower __PROTO((int));
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.7 1991/09/24 17:05:40
- --- curses.h 1992/06/03 15:26:55
- ***************
- *** 37,52 ****
-
- #include <termcap.h>
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- -
- # define bool char
- # define reg register
-
- # define TRUE (1)
- # define FALSE (0)
- # define ERR (0)
- # define OK (1)
-
- --- 37,53 ----
-
- #include <termcap.h>
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- # define bool char
- # define reg register
-
- + #ifndef TRUE
- # define TRUE (1)
- # define FALSE (0)
- + #endif
- # define ERR (0)
- # define OK (1)
-
- ***************
- *** 74,80 ****
- */
-
- #ifdef HZ
- ! # undef HZ /* in case they included sys/param.h */
- #endif
-
- extern bool AM, BS, CA, DA, DB, EO, HC, HZ, IN, MI, MS, NC, NS, OS, UL,
- --- 75,81 ----
- */
-
- #ifdef HZ
- ! #undef HZ /* in case they included sys/param.h */
- #endif
-
- extern bool AM, BS, CA, DA, DB, EO, HC, HZ, IN, MI, MS, NC, NS, OS, UL,
- ***************
- *** 287,294 ****
- __EXTERN char *unctrl __PROTO((int c));
- #endif
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- ! # endif
- --- 288,295 ----
- __EXTERN char *unctrl __PROTO((int c));
- #endif
-
- ! #ifdef __cplusplus
- }
- #endif
-
- ! #endif
- *** 1.5 1991/06/20 02:21:30
- --- device.h 1992/06/03 15:26:56
- ***************
- *** 11,17 ****
- #include <types.h>
- #endif
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 11,17 ----
- #include <types.h>
- #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 44,50 ****
- __EXTERN struct _device *_dev_dosname __PROTO((const char *dosnm));
- __EXTERN struct _device *_dev_unxname __PROTO((const char *unm));
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 44,50 ----
- __EXTERN struct _device *_dev_dosname __PROTO((const char *dosnm));
- __EXTERN struct _device *_dev_unxname __PROTO((const char *unm));
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.9 1991/06/20 02:21:30
- --- dirent.h 1992/06/03 15:26:56
- ***************
- *** 12,21 ****
- #endif
-
- #ifndef NAME_MAX
- ! # include <limits.h>
- #endif
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 12,21 ----
- #endif
-
- #ifndef NAME_MAX
- ! # include <limits.h>
- #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 26,33 ****
-
- struct dirent {
- long d_ino; /* garbage under TOS */
- ! off_t d_off; /* in TOS, entry in list */
- ! short d_reclen; /* in TOS, length of d_name */
- /* the following (except for d_name) are unique to TOS */
- struct dirent *d_next; /* ptr to next struct dirent in list */
- unsigned char d_attribute; /* file modes from Fsfirst() */
- --- 26,34 ----
-
- struct dirent {
- long d_ino; /* garbage under TOS */
- ! off_t d_off; /* position in directory */
- ! short d_reclen; /* for us, length of d_name */
- ! #ifndef __MINT__
- /* the following (except for d_name) are unique to TOS */
- struct dirent *d_next; /* ptr to next struct dirent in list */
- unsigned char d_attribute; /* file modes from Fsfirst() */
- ***************
- *** 34,41 ****
- --- 35,46 ----
- unsigned short d_time, d_date; /* TOS date and time for file */
- long d_size; /* file size */
- char d_name[1];
- + #else
- + char d_name[NAME_MAX+1];
- + #endif
- };
-
- + #ifndef __MINT__
- typedef struct _DIR {
- struct dirent *D_list; /* list of directory entries */
- struct dirent *D_curpos; /* current position in list */
- ***************
- *** 43,48 ****
- --- 48,69 ----
- struct _DIR *D_nxtdir; /* next DIR in opendir chain */
- } DIR;
-
- + #else
- +
- + typedef struct _DIR {
- + short status; /* status of the search so far: */
- + #define _INSEARCH 0 /* need to call Fsnext for a new entry */
- + #define _STARTSEARCH 1 /* Fsfirst called once, successfully */
- + #define _NMFILE 2 /* no more files in directory */
- + char dta[44]; /* TOS DTA for this directory */
- + char *dirname; /* directory of the search (used under
- + TOS for rewinddir) */
- + struct dirent buf; /* dirent struct for this directory */
- + } DIR;
- +
- + #endif /* __MINT__ */
- +
- +
- #define DIRENTSIZ(x) (sizeof(struct dirent) + (x) + 1)
-
- /* allow BSD emulation via sys/dir.h */
- ***************
- *** 64,70 ****
- __EXTERN void rewinddir __PROTO((DIR *dirp));
- __EXTERN int closedir __PROTO((DIR *dirp));
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 85,91 ----
- __EXTERN void rewinddir __PROTO((DIR *dirp));
- __EXTERN int closedir __PROTO((DIR *dirp));
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.9 1991/06/20 02:21:30
- --- errno.h 1992/06/03 15:26:56
- ***************
- *** 1,7 ****
- #ifndef _ERRNO_H
- #define _ERRNO_H
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 1,11 ----
- #ifndef _ERRNO_H
- #define _ERRNO_H
-
- ! #ifndef _COMPILER_H
- ! #include <compiler.h>
- ! #endif
- !
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 56,64 ****
- #define ENMFILES 49 /* no more files (fsnext) */
- #define ENMFIL 49 /* no more files (from fsnext) */
-
- - #define EDOM 62
- - #define ERANGE 63
- -
- #define EBADARG 64 /* range error/context unknown */
- #define EINTERNAL 65 /* internal error */
- #define EINTRN EINTERNAL /* " " */
- --- 60,65 ----
- ***************
- *** 67,77 ****
- #define ESBLOCK 67 /* set block failed/growth restraints*/
- #define EGSBF ESBLOCK /* or memory block growth failure */
- /* (gap) */
- ! #define EEXIST 80 /* file exists (open) */
- ! #define ENAMETOOLONG 81 /* file exists (open) */
- ! #define ENOTTY 82 /* not a tty (ioctl) */
- ! #define EAGAIN EDRNRDY /* try again later */
- ! #define ENOTDIR EPATH /* preliminary */
-
- #define EINTR 128 /* this *should* be fake */
-
- --- 68,79 ----
- #define ESBLOCK 67 /* set block failed/growth restraints*/
- #define EGSBF ESBLOCK /* or memory block growth failure */
- /* (gap) */
- ! # define EMLINK 80 /* too many symbolic links */
- ! # define EEXIST 85 /* file exists, try again later */
- ! # define ENAMETOOLONG 86 /* name too long */
- ! # define ENOTTY 87
- ! # define ERANGE 88
- ! # define EDOM 89
-
- #define EINTR 128 /* this *should* be fake */
-
- ***************
- *** 79,85 ****
- extern int sys_nerr;
- extern char * sys_errlist[];
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 81,87 ----
- extern int sys_nerr;
- extern char * sys_errlist[];
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.14 1992/01/29 21:08:08
- --- fcntl.h 1992/06/03 15:26:56
- ***************
- *** 5,11 ****
- #ifndef _FCNTL_H
- #define _FCNTL_H
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 5,15 ----
- #ifndef _FCNTL_H
- #define _FCNTL_H
-
- ! #ifndef _COMPILER_H
- ! #include <compiler.h>
- ! #endif
- !
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 24,30 ****
-
- #define O_NDELAY 0x100 /* Non-blocking I/O */
- #ifdef __MINT__
- ! # define O_SYNC 0x00 /* sync after writes (not implemented) */
- #endif
-
- /* the following flags are not passed to the OS */
- --- 28,34 ----
-
- #define O_NDELAY 0x100 /* Non-blocking I/O */
- #ifdef __MINT__
- ! # define O_SYNC 0x00 /* sync after writes (not implemented) */
- #endif
-
- /* the following flags are not passed to the OS */
- ***************
- *** 32,42 ****
- #define O_TRUNC 0x400 /* make file 0 length */
- #define O_EXCL 0x800 /* error if file exists */
- #define O_APPEND 0x1000 /* position at EOF */
- ! #define O_PIPE 0x2000 /* serial pipe */
- !
-
- /*
- ! * access
- */
- #define F_OK 0
- #define X_OK 1
- --- 36,47 ----
- #define O_TRUNC 0x400 /* make file 0 length */
- #define O_EXCL 0x800 /* error if file exists */
- #define O_APPEND 0x1000 /* position at EOF */
- ! #ifndef __MINT__
- ! # define O_PIPE 0x2000 /* serial pipe */
- ! #endif
-
- /*
- ! * defines for the access() function
- */
- #define F_OK 0
- #define X_OK 1
- ***************
- *** 43,48 ****
- --- 48,56 ----
- #define W_OK 2
- #define R_OK 4
-
- + /*
- + * defines for fcntl()
- + */
- #define F_DUPFD 0 /* Duplicate fildes */
- #define F_GETFD 1 /* Get fildes flags */
- #define F_SETFD 2 /* Set fildes flags */
- ***************
- *** 65,75 ****
- };
- #endif /* __MINT__ */
-
- - /* defs for handle frob */
-
- ! #define __NHANDLES 80
-
- ! #ifndef __MINT__
- struct __open_file {
- unsigned short append:1; /* 1 if O_APPEND set for this file */
- unsigned short nodelay:1; /* 1 if O_NDELAY set for this file */
- --- 73,91 ----
- };
- #endif /* __MINT__ */
-
-
- ! #ifdef __MINT__
-
- ! #define __NHANDLES 40
- !
- ! struct __open_file {
- ! short status; /* whether or not it's a tty */
- ! short flags; /* if a tty, its flags */
- ! };
- !
- ! #else
- !
- ! #define __NHANDLES 80
- struct __open_file {
- unsigned short append:1; /* 1 if O_APPEND set for this file */
- unsigned short nodelay:1; /* 1 if O_NDELAY set for this file */
- ***************
- *** 79,92 ****
- char *filename; /* filename of open file */
- };
-
- ! #else /* __MINT__ */
- !
- ! struct __open_file {
- ! short status; /* whether or not it's a tty */
- ! short flags; /* if a tty, its flags */
- ! };
- !
- ! #endif /* __MINT */
-
- extern struct __open_file __open_stat[__NHANDLES];
- /* NOTE: this array is indexed by (__OPEN_INDEX(fd)) */
- --- 95,101 ----
- char *filename; /* filename of open file */
- };
-
- ! #endif /* __MINT__ */
-
- extern struct __open_file __open_stat[__NHANDLES];
- /* NOTE: this array is indexed by (__OPEN_INDEX(fd)) */
- ***************
- *** 109,122 ****
- #define FH_ISAFILE 2
-
-
- - #ifndef _COMPILER_H
- - #include <compiler.h>
- - #endif
- -
- __EXTERN int fcntl __PROTO((int f, int cmd, ...));
-
- !
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 118,126 ----
- #define FH_ISAFILE 2
-
-
- __EXTERN int fcntl __PROTO((int f, int cmd, ...));
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.4 1992/03/06 19:29:17
- --- file.h 1992/06/03 15:26:57
- ***************
- *** 1,19 ****
- #ifndef _FILE_H
- #define _FILE_H
-
- ! #ifdef __MINT__
- ! # ifndef _COMPILER_H
- ! # include <compiler.h>
- ! # endif
-
- ! /* lockf() comands */
- ! # define LOCK_SH 1 /* shared lock */
- ! # define LOCK_EX 2 /* exclusive lock */
- ! # define LOCK_NB 4 /* non-blocking */
- ! # define LOCK_UN 8 /* unlock */
-
- ! __EXTERN int flock __PROTO((int, int));
- ! #endif /* __MINT__ */
-
- #include <fcntl.h>
-
- --- 1,19 ----
- #ifndef _FILE_H
- #define _FILE_H
-
- ! #ifndef _COMPILER_H
- ! #include <compiler.h>
- ! #endif
-
- ! #ifdef __MINT__
- ! /* lockf() comands */
- ! #define LOCK_SH 1 /* shared lock */
- ! #define LOCK_EX 2 /* exclusive lock */
- ! #define LOCK_NB 4 /* non-blocking */
- ! #define LOCK_UN 8 /* unlock */
-
- ! __EXTERN int flock __PROTO((int, int));
- ! #endif
-
- #include <fcntl.h>
-
- *** 1.6 1992/04/13 15:53:11
- --- float.h 1992/06/03 15:26:57
- ***************
- *** 11,16 ****
- --- 11,75 ----
- #ifndef _FLOAT_H
- #define _FLOAT_H
-
- + #ifndef _COMPILER_H
- + #include <compiler.h>
- + #endif
- +
- + #ifdef __SOZOBON__
- +
- + /* 4/19/92 sb
- + These constants correspond to version 2.0 of David Brooks' floating point
- + library, which Sozobon 1.33i uses. */
- +
- + /* Radix of exponent representation */
- + #define FLT_RADIX 2
- + /* Number of base-FLT_RADIX digits in the mantissa of a float */
- + #define FLT_MANT_DIG 24
- + /* Number of decimal digits of precision in a float */
- + #define FLT_DIG 7
- + /* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */
- + #define FLT_ROUNDS 1
- + /* Minimum float x such that 1.0+x != 1.0 */
- + #define FLT_EPSILON ((float)1.192092891e-07)
- + /* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */
- + #define FLT_MIN_EXP (-63)
- + /* Minimum normalised float */
- + #define FLT_MIN ((float)5.421010547e-20)
- + /* Minimum int x such that 10**x is a normalised float */
- + #define FLT_MIN_10_EXP (-19)
- + /* Maximum int x such that FLT_RADIX**(x-1) is a representable float */
- + #define FLT_MAX_EXP 64
- + /* Maximum float */
- + #define FLT_MAX ((float)9.2233715e18)
- + /* Maximum int x such that 10**x is a representable float */
- + #define FLT_MAX_10_EXP 18
- +
- + /* double is identical to float */
- + #define DBL_MANT_DIG FLT_MANT_DIG
- + #define DBL_DIG FLT_DIG
- + #define DBL_ROUNDS FLT_ROUNDS
- + #define DBL_EPSILON ((double)FLT_EPSILON)
- + #define DBL_MIN_EXP FLT_MIN_EXP
- + #define DBL_MIN ((double)FLT_MIN)
- + #define DBL_MIN_10_EXP FLT_MIN_10_EXP
- + #define DBL_MAX_EXP FLT_MAX_EXP
- + #define DBL_MAX ((double)FLT_MAX)
- + #define DBL_MAX_10_EXP FLT_MAX_10_EXP
- +
- + /* so is long double */
- + #define LDBL_MANT_DIG FLT_MANT_DIG
- + #define LDBL_DIG FLT_DIG
- + #define LDBL_ROUNDS FLT_ROUNDS
- + #define LDBL_EPSILON ((long double)FLT_EPSILON)
- + #define LDBL_MIN_EXP FLT_MIN_EXP
- + #define LDBL_MIN ((long double)FLT_MIN)
- + #define LDBL_MIN_10_EXP FLT_MIN_10_EXP
- + #define LDBL_MAX_EXP FLT_MAX_EXP
- + #define LDBL_MAX ((long double)FLT_MAX)
- + #define LDBL_MAX_10_EXP FLT_MAX_10_EXP
- +
- + #else /* __SOZOBON__ */
- +
- /* float.h */
- /* Produced by config version 4.2, CWI, Amsterdam */
-
- ***************
- *** 73,81 ****
- #define LDBL_MAX_EXP 1024
- /* Maximum long double */
- /*#define LDBL_MAX 1.7976931348623157e+308L*/
- ! #define LDBL_MAX 1.7976931348623158e+308L
- /* Maximum int x such that 10**x is a representable long double */
- #define LDBL_MAX_10_EXP 308
-
-
- #endif /* _FLOAT_H */
- --- 132,141 ----
- #define LDBL_MAX_EXP 1024
- /* Maximum long double */
- /*#define LDBL_MAX 1.7976931348623157e+308L*/
- ! #define LDBL_MAX 1.7976931348623158e+308
- /* Maximum int x such that 10**x is a representable long double */
- #define LDBL_MAX_10_EXP 308
-
- + #endif /* __SOZOBON__ */
-
- #endif /* _FLOAT_H */
- *** 1.5 1991/06/20 02:21:30
- --- ftw.h 1992/06/03 15:26:57
- ***************
- *** 8,14 ****
- #ifndef _FTW_H
- #define _FTW_H
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 8,14 ----
- #ifndef _FTW_H
- #define _FTW_H
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 17,26 ****
- #define FTW_DNR 2 /* Something opendir(3) failed on */
- #define FTW_NS 3 /* Something stat(2) failed on */
-
- __EXTERN int ftw
- __PROTO((char *path, int (*fn)(char *, struct stat *, int), int param));
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 17,27 ----
- #define FTW_DNR 2 /* Something opendir(3) failed on */
- #define FTW_NS 3 /* Something stat(2) failed on */
-
- +
- __EXTERN int ftw
- __PROTO((char *path, int (*fn)(char *, struct stat *, int), int param));
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.1 1991/12/26 16:23:20
- --- gdbm.h 1992/06/03 15:26:57
- ***************
- *** 27,32 ****
- --- 27,36 ----
-
- *************************************************************************/
-
- + #ifdef __cplusplus
- + extern "C" {
- + #endif
- +
- /* Parameters to gdbm_open for READERS, WRITERS, and WRITERS who
- can create the database. */
- #define GDBM_READER 0 /* A reader. */
- ***************
- *** 91,93 ****
- --- 95,101 ----
- GDBM_CANNOT_REPLACE,
- GDBM_ILLEGAL_DATA}
- gdbm_error;
- +
- + #ifdef __cplusplus
- + }
- + #endif
- *** 1.11 1992/01/29 21:08:08
- --- gemfast.h 1992/06/03 15:26:58
- ***************
- *** 1,7 ****
- #ifndef _GEMFAST_H
- #define _GEMFAST_H
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 1,7 ----
- #ifndef _GEMFAST_H
- #define _GEMFAST_H
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 248,254 ****
-
- /* VDI Memory Form Definition Block */
-
- ! #if !defined(__MFDB__) && !defined(_ALT_MFDB) && !defined(__ALT_MFDB__)
- #define __MFDB__
-
- typedef struct
- --- 248,257 ----
-
- /* VDI Memory Form Definition Block */
-
- ! #ifndef __MFDB__
- ! #ifndef _ALT_MFDB
- ! #ifndef __ALT_MFDB__
- !
- #define __MFDB__
-
- typedef struct
- ***************
- *** 265,270 ****
- --- 268,275 ----
- short fd_r2; /* Reserved */
- short fd_r3; /* Reserved */
- } MFDB;
- + #endif
- + #endif
- #endif /* __MFDB__ */
-
- #ifdef __ALT_MFDB__
- ***************
- *** 491,497 ****
- extern void *_addrin[], *_addrout[];
- extern int gl_apid, gl_ap_version;
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 496,502 ----
- extern void *_addrin[], *_addrout[];
- extern int gl_apid, gl_ap_version;
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.4 1991/06/20 02:21:30
- --- gnu-ar.h 1992/06/03 15:26:58
- ***************
- *** 1,7 ****
- #ifndef _GNUAR_H
- #define _GNUAR_H
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 1,7 ----
- #ifndef _GNUAR_H
- #define _GNUAR_H
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 42,48 ****
- char ar_fmag[2]; /* does this have to be last? */
- };
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 42,48 ----
- char ar_fmag[2]; /* does this have to be last? */
- };
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.5 1991/06/20 02:21:30
- --- grp.h 1992/06/03 15:26:58
- ***************
- *** 1,15 ****
- #ifndef _GRP_H
- #define _GRP_H
-
- ! #if defined(__cplusplus)
- ! extern "C" {
- #endif
-
- ! /*
- ! * We don't do groups at all. This file provides enough fakes to get
- ! * the GNU file utilities compiled; if more are needed (probably)
- ! * add them.
- ! */
-
- struct group {
- char *gr_name;
- --- 1,13 ----
- #ifndef _GRP_H
- #define _GRP_H
-
- ! #ifndef _COMPILER_H
- ! #include <compiler.h>
- #endif
-
- ! #ifdef __cplusplus
- ! extern "C" {
- ! #endif
-
- struct group {
- char *gr_name;
- ***************
- *** 18,31 ****
- char **gr_mem;
- };
-
- ! #ifndef _COMPILER_H
- ! #include <compiler.h>
- ! #endif
- !
- __EXTERN struct group * getgrgid __PROTO((int gid));
- __EXTERN struct group * getgrnam __PROTO((char *name));
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 16,28 ----
- char **gr_mem;
- };
-
- ! __EXTERN void setgrent __PROTO((void));
- ! __EXTERN void endgrent __PROTO((void));
- ! __EXTERN struct group * getgrent __PROTO((void));
- __EXTERN struct group * getgrgid __PROTO((int gid));
- __EXTERN struct group * getgrnam __PROTO((char *name));
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.15 1992/03/22 22:05:23
- --- ioctl.h 1992/06/03 15:26:58
- ***************
- *** 1,7 ****
- #ifndef _IOCTL_H
- ! # define _IOCTL_H
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 1,11 ----
- #ifndef _IOCTL_H
- ! #define _IOCTL_H
-
- ! #ifndef _COMPILER_H
- ! #include <compiler.h>
- ! #endif
- !
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 34,40 ****
- #define TIOCLSET (('T'<<8) | 19)
-
- #define NTTYDISC 1
- !
- /* ioctl's to act on processes */
- #define PPROCADDR (('P'<<8) | 1)
- #define PBASEADDR (('P'<<8) | 2)
- --- 38,44 ----
- #define TIOCLSET (('T'<<8) | 19)
-
- #define NTTYDISC 1
- !
- /* ioctl's to act on processes */
- #define PPROCADDR (('P'<<8) | 1)
- #define PBASEADDR (('P'<<8) | 2)
- ***************
- *** 64,85 ****
- #define ECHO 0x0004
- #define XTABS 0x0008
- #define RAW 0x0010
- ! #define LCASE 0x0020 /* does nothing (and never will!) */
- ! #define TANDEM 0x0000 /* not needed */
- ! #define META 0x0100 /* extension: Alternate as meta key */
- ! #define PASS8 0x0100
- #define EVENP 0x4000
- #define ODDP 0x8000
-
- - #ifdef __MINT__
- - #define TOSTOP 0x0100
- - #define XKEY 0x0200
- - struct xkey {
- - short xk_num;
- - char xk_def[8];
- - };
- - #endif
- -
- /* Only ones that are likely to be used are here */
- /* ok, but emacs thinks it knows their value */
- #define B50 1
- --- 68,78 ----
- #define ECHO 0x0004
- #define XTABS 0x0008
- #define RAW 0x0010
- ! #define LCASE 0x0020 /* does nothing */
- ! #define TANDEM 0x1000
- #define EVENP 0x4000
- #define ODDP 0x8000
-
- /* Only ones that are likely to be used are here */
- /* ok, but emacs thinks it knows their value */
- #define B50 1
- ***************
- *** 99,106 ****
- --- 92,127 ----
- #define B38400 15
-
- #define ANYP (B300|B1200|B2400|B4800|B9600)
- + /* The ones below aren't supported by the kernel, at least not yet */
- + #define VTDELAY 0
- #define ALLDELAY 0
-
- + #ifdef __MINT__
- +
- + #define TOSTOP 0x0100
- + #define XKEY 0x0200
- +
- + struct xkey {
- + short xk_num;
- + char xk_def[8];
- + };
- +
- + /* some fake defines for the line discipline stuff */
- +
- + #define LCRTBS 0x01
- + #define LCRTERA 0x02
- + #define LCRTKIL 0x04
- + #define LPRTERA 0x10
- + #define LFLUSHO 0x20
- + #define LLITOUT 0x100
- +
- + #else
- +
- + #define META 0x0100 /* extension: Alternate as meta key */
- + #define PASS8 0x0100
- +
- + #endif /* __MINT__ */
- +
- struct sgttyb {
- char sg_ispeed;
- char sg_ospeed;
- ***************
- *** 116,130 ****
- short ws_ypixel;
- };
-
- ! #ifndef _COMPILER_H
- ! #include <compiler.h>
- ! #endif
- !
- ! __EXTERN int ioctl __PROTO((int fd, int func, void *arg));
- ! __EXTERN int stty __PROTO((int fd, struct sgttyb *tty));
- ! __EXTERN int gtty __PROTO((int fd, struct sgttyb *tty));
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 137,147 ----
- short ws_ypixel;
- };
-
- ! __EXTERN int ioctl __PROTO((int, int, void *));
- ! __EXTERN int stty __PROTO((int, struct sgttyb *));
- ! __EXTERN int gtty __PROTO((int, struct sgttyb *));
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.8 1991/06/20 02:21:30
- --- keycodes.h 1992/06/03 15:26:59
- ***************
- *** 3,9 ****
- #ifndef _KEYCODES_H
- #define _KEYCODES_H
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 3,9 ----
- #ifndef _KEYCODES_H
- #define _KEYCODES_H
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- *** 1.7 1991/05/23 15:15:09
- --- limits.h 1992/06/03 15:26:59
- ***************
- *** 6,76 ****
- #ifndef _LIMITS_H
- #define _LIMITS_H
-
- ! #define PATHSIZE (128) /* maximum pathname length */
-
- #define BITSPERBYTE 8
-
- - /* limits.h */
- - /* Produced by config version 4.2, CWI, Amsterdam */
-
- - /* Number of bits in a storage unit */
- #define CHAR_BIT 8
-
- - #ifdef __CHAR_UNSIGNED__ /* char is unsigned */
- - /* Maximum char */
- - #define CHAR_MAX 255
- - /* Minimum char */
- - #define CHAR_MIN 0
- -
- - #else /* char is signed */
- -
- - /* Maximum char */
- - #define CHAR_MAX 127
- - /* Minimum char */
- - #define CHAR_MIN (-128)
- -
- - #endif /* __CHAR_UNSIGNED__ */
- -
- - /* Maximum signed char */
- #define SCHAR_MAX 127
- - /* Minimum signed char */
- #define SCHAR_MIN (-128)
- - /* Maximum unsigned char (minimum is always 0) */
- #define UCHAR_MAX 255
- ! /* Maximum short */
- #define SHRT_MAX 32767
- - /* Minimum short */
- #define SHRT_MIN (-32768)
- - /* Maximum long */
- #define LONG_MAX 2147483647L
- - /* Minimum long */
- #define LONG_MIN (-2147483648L)
- - /* Maximum unsigned short (minimum is always 0) */
- #define USHRT_MAX 65535U
- - /* Maximum unsigned long (minimum is always 0) */
- #define ULONG_MAX 4294967295UL
-
- #ifdef __MSHORT__ /* 16 bit ints */
- - /* Maximum int */
- #define INT_MAX SHRT_MAX
- - /* Minimum int */
- #define INT_MIN SHRT_MIN
- - /* Maximum unsigned int (minimum is always 0) */
- #define UINT_MAX USHRT_MAX
-
- #else /* 32 bit ints */
-
- - /* Maximum int */
- #define INT_MAX 2147483647
- - /* Minimum int */
- #define INT_MIN (-2147483648)
- - /* Maximum unsigned int (minimum is always 0) */
- #define UINT_MAX 4294967295U
-
- #endif /* __MSHORT__ */
-
- !
- ! #define MB_LEN_MAX 1 /* max. number of bytes in a multibyte character */
-
- /*
- * POSIX-specific stuff; see 1003.1 sect. 2.9
- --- 6,56 ----
- #ifndef _LIMITS_H
- #define _LIMITS_H
-
- ! #ifndef _COMPILER_H
- ! #include <compiler.h>
- ! #endif
-
- + #ifndef __MINT__
- + #define PATHSIZE (128) /* maximum pathname length */
- #define BITSPERBYTE 8
- + #endif
-
-
- #define CHAR_BIT 8
-
- #define SCHAR_MAX 127
- #define SCHAR_MIN (-128)
- #define UCHAR_MAX 255
- !
- ! #ifdef __CHAR_UNSIGNED__
- ! #define CHAR_MAX UCHAR_MAX
- ! #define CHAR_MIN 0
- ! #else
- ! #define CHAR_MAX SCHAR_MAX
- ! #define CHAR_MIN SCHAR_MIN
- ! #endif
- !
- #define SHRT_MAX 32767
- #define SHRT_MIN (-32768)
- #define LONG_MAX 2147483647L
- #define LONG_MIN (-2147483648L)
- #define USHRT_MAX 65535U
- #define ULONG_MAX 4294967295UL
-
- #ifdef __MSHORT__ /* 16 bit ints */
- #define INT_MAX SHRT_MAX
- #define INT_MIN SHRT_MIN
- #define UINT_MAX USHRT_MAX
-
- #else /* 32 bit ints */
-
- #define INT_MAX 2147483647
- #define INT_MIN (-2147483648)
- #define UINT_MAX 4294967295U
-
- #endif /* __MSHORT__ */
-
- ! #define MB_LEN_MAX 1 /* max. number of bytes in a multibyte character */
-
- /*
- * POSIX-specific stuff; see 1003.1 sect. 2.9
- ***************
- *** 81,87 ****
-
- #define _POSIX_ARG_MAX 4096
- #define _POSIX_CHILD_MAX 6
- ! #define _POSIX_LINK_MAX 1 /* <- NON-CONFORMING */
- #define _POSIX_MAX_CANON 64 /* <- NON-CONFORMING */
- #define _POSIX_MAX_INPUT 64 /* <- NON-CONFORMING */
- #define _POSIX_NAME_MAX 14
- --- 61,67 ----
-
- #define _POSIX_ARG_MAX 4096
- #define _POSIX_CHILD_MAX 6
- ! #define _POSIX_LINK_MAX 8
- #define _POSIX_MAX_CANON 64 /* <- NON-CONFORMING */
- #define _POSIX_MAX_INPUT 64 /* <- NON-CONFORMING */
- #define _POSIX_NAME_MAX 14
- ***************
- *** 88,94 ****
- #define _POSIX_NGROUPS_MAX 0
- #define _POSIX_OPEN_MAX 16
- #define _POSIX_PATH_MAX 128 /* <- NON-CONFORMING */
- ! #define _POSIX_PIPE_BUF 1 /* <- NON-CONFORMING */
-
- #ifndef __STRICT_ANSI__
-
- --- 68,74 ----
- #define _POSIX_NGROUPS_MAX 0
- #define _POSIX_OPEN_MAX 16
- #define _POSIX_PATH_MAX 128 /* <- NON-CONFORMING */
- ! #define _POSIX_PIPE_BUF 512
-
- #ifndef __STRICT_ANSI__
-
- ***************
- *** 100,109 ****
- #endif
-
- #define OPEN_MAX 20
- ! #define LINK_MAX _POSIX_LINK_MAX
- #define MAX_CANON _POSIX_MAX_CANON
- #define MAX_INPUT _POSIX_MAX_INPUT
- ! #define NAME_MAX _POSIX_NAME_MAX
-
- /* _LIB_NAME_MAX longest name supported in the library
- * before you change this, please look at stat.c, symdir.c, dirent.[ch],
- --- 80,95 ----
- #endif
-
- #define OPEN_MAX 20
- ! #ifdef __MINT__
- ! # define LINK_MAX 32767
- ! #else
- ! # define LINK_MAX 1
- ! #endif
- !
- #define MAX_CANON _POSIX_MAX_CANON
- #define MAX_INPUT _POSIX_MAX_INPUT
- ! #define NAME_MAX 31
- ! /* actually, MiNT file systems _could_ support more */
-
- /* _LIB_NAME_MAX longest name supported in the library
- * before you change this, please look at stat.c, symdir.c, dirent.[ch],
- *** 1.10 1991/09/24 17:05:40
- --- linea.h 1992/06/03 15:26:59
- ***************
- *** 11,17 ****
- #include <compiler.h>
- #endif
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 11,17 ----
- #include <compiler.h>
- #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 760,766 ****
-
- /* Functions */
-
- ! #ifndef __NO_INLINE__
-
- #define linea0() \
- ({ \
- --- 760,766 ----
-
- /* Functions */
-
- ! #ifdef __GNUC_INLINE__
-
- #define linea0() \
- ({ \
- ***************
- *** 987,995 ****
- __EXTERN void lineae __PROTO((void));
- __EXTERN void lineaf __PROTO((void));
-
- ! #endif /* __NO_INLINE__ */
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 987,995 ----
- __EXTERN void lineae __PROTO((void));
- __EXTERN void lineaf __PROTO((void));
-
- ! #endif /* __GNUC_INLINE__ */
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.6 1991/06/20 02:21:30
- --- locale.h 1992/06/03 15:26:59
- ***************
- *** 10,16 ****
- #include <compiler.h>
- #endif
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 10,16 ----
- #include <compiler.h>
- #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 47,53 ****
-
- __EXTERN struct lconv * localeconv __PROTO((void));
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 47,53 ----
-
- __EXTERN struct lconv * localeconv __PROTO((void));
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.3 1992/02/04 18:47:36
- --- math-68881.h 1992/06/03 15:27:00
- ***************
- *** 152,158 ****
- {
- double value;
-
- ! __asm ("fmove%.d %#0rnan,%0" /* quiet NaN */
- : "=f" (value)
- : /* no inputs */);
- return value;
- --- 152,158 ----
- {
- double value;
-
- ! __asm ("fmove%.d %#0x7fffffffffffffff,%0" /* quiet NaN */
- : "=f" (value)
- : /* no inputs */);
- return value;
- ***************
- *** 279,285 ****
- {
- double value;
-
- ! __asm ("fmove%.d %#0rnan,%0" /* quiet NaN */
- : "=f" (value)
- : /* no inputs */);
- return value;
- --- 279,285 ----
- {
- double value;
-
- ! __asm ("fmove%.d %#0x7fffffffffffffff,%0" /* quiet NaN */
- : "=f" (value)
- : /* no inputs */);
- return value;
- ***************
- *** 305,311 ****
- {
- double value;
-
- ! __asm ("fmove%.d %#0rnan,%0" /* quiet NaN */
- : "=f" (value)
- : /* no inputs */);
- return value;
- --- 305,311 ----
- {
- double value;
-
- ! __asm ("fmove%.d %#0x7fffffffffffffff,%0" /* quiet NaN */
- : "=f" (value)
- : /* no inputs */);
- return value;
- *** 1.13 1992/03/22 22:05:23
- --- math.h 1992/06/03 15:27:00
- ***************
- *** 38,44 ****
- */
-
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 38,48 ----
- */
-
-
- ! #ifndef _COMPILER_H
- ! #include <compiler.h>
- ! #endif
- !
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 83,97 ****
- #include <math-68881.h>
- #endif
-
- ! #if defined(__GNUC__) && (!defined(__cplusplus))
- ! #ifndef max
- ! #define max(x,y) ({typeof(x) _x=(x); typeof(y) _y=(y); if (_x>_y) _y=_x; _y;})
- ! #define min(x,y) ({typeof(x) _x=(x); typeof(y) _y=(y); if (_x<_y) _y=_x; _y;})
- ! #endif
- ! #endif
- !
- ! #ifndef _COMPILER_H
- ! #include <compiler.h>
- #endif
-
- #ifndef _M68881
- --- 87,99 ----
- #include <math-68881.h>
- #endif
-
- ! #ifdef __GNUC__
- ! # ifndef __cplusplus
- ! # ifndef max
- ! # define max(x,y) ({typeof(x) _x=(x); typeof(y) _y=(y); if (_x>_y) _y=_x; _y;})
- ! # define min(x,y) ({typeof(x) _x=(x); typeof(y) _y=(y); if (_x<_y) _y=_x; _y;})
- ! # endif
- ! # endif
- #endif
-
- #ifndef _M68881
- ***************
- *** 168,174 ****
- __EXTERN double frexp __PROTO((double, int *));
- #endif /* !_M68881 */
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 170,176 ----
- __EXTERN double frexp __PROTO((double, int *));
- #endif /* !_M68881 */
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.15 1992/03/22 22:05:23
- --- memory.h 1992/06/03 15:27:00
- ***************
- *** 5,11 ****
- #include <compiler.h>
- #endif
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 5,11 ----
- #include <compiler.h>
- #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 14,22 ****
- typedef _SIZE_T size_t;
- #endif
-
- ! #if defined(__GNUC__) || defined(__GNUG__)
- # ifndef alloca
- ! # define alloca(x) __builtin_alloca(x)
- # endif
- #endif
-
- --- 14,22 ----
- typedef _SIZE_T size_t;
- #endif
-
- ! #ifdef __GNUC__
- # ifndef alloca
- ! # define alloca(X) __builtin_alloca(X)
- # endif
- #endif
-
- ***************
- *** 26,44 ****
- __EXTERN void *calloc __PROTO((size_t n, size_t sz));
- __EXTERN void _malloczero __PROTO((int yes));
- __EXTERN void _mallocChunkSize __PROTO((size_t siz));
- #ifndef alloca
- # ifndef __cplusplus
- __EXTERN void *alloca __PROTO((size_t));
- # else
- ! __EXTERN void *alloca __PROTO((long unsigned int));
- # endif
- #endif
- - __EXTERN void *mlalloc __PROTO((long));
- - __EXTERN void *relalloc __PROTO((void *, long));
- - __EXTERN void *clalloc __PROTO((long, long));
-
- ! #if defined(__cplusplus)
- ! }
- #endif
-
- #endif /* _MEMORY_H */
- --- 26,56 ----
- __EXTERN void *calloc __PROTO((size_t n, size_t sz));
- __EXTERN void _malloczero __PROTO((int yes));
- __EXTERN void _mallocChunkSize __PROTO((size_t siz));
- +
- + __EXTERN void *_malloc __PROTO((unsigned long n));
- + __EXTERN void *_realloc __PROTO((void *_r, unsigned long n));
- + __EXTERN void *_calloc __PROTO((unsigned long n, unsigned long sz));
- +
- + __EXTERN void *sbrk __PROTO((size_t));
- + __EXTERN void *lsbrk __PROTO((long));
- + __EXTERN void *_sbrk __PROTO((long));
- +
- #ifndef alloca
- # ifndef __cplusplus
- __EXTERN void *alloca __PROTO((size_t));
- # else
- ! __EXTERN void *alloca __PROTO((long unsigned int));
- # endif
- #endif
-
- ! #ifdef __SOZOBON__
- ! __EXTERN void *lmalloc __PROTO((long));
- ! __EXTERN void *lrealloc __PROTO((void *, long));
- ! __EXTERN void *lcalloc __PROTO((long, long));
- #endif
-
- + #ifdef __cplusplus
- + }
- + #endif
- +
- #endif /* _MEMORY_H */
- *** 1.11 1992/03/22 22:05:23
- --- minimal.h 1992/06/03 15:27:01
- ***************
- *** 6,12 ****
- #include <osbind.h>
- #endif
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 6,12 ----
- #include <osbind.h>
- #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 15,33 ****
- int _console_dev = 2;
- #endif
-
-
- __EXTERN __EXITING __exit __PROTO((long)); /* def in crt0.c */
- -
- - void _init_signal __PROTO((void));
- int raise __PROTO((int sig));
- - void exit __PROTO((int status));
- void _exit __PROTO((int status));
- - void _main __PROTO((long argc, char **argv, char **environ));
-
- ! void
- ! _init_signal()
- {
- ! /* NULL */
- }
-
- int
- --- 15,30 ----
- int _console_dev = 2;
- #endif
-
- + #ifndef __MINT__
-
- __EXTERN __EXITING __exit __PROTO((long)); /* def in crt0.c */
- int raise __PROTO((int sig));
- void _exit __PROTO((int status));
-
- ! void _exit(status)
- ! int status;
- {
- ! __exit((long)status);
- }
-
- int
- ***************
- *** 37,66 ****
- return 0;
- }
-
- void
- ! exit(status)
- ! int status;
- {
- - __exit((long)status);
- }
-
- ! void _exit(status)
- int status;
- {
- ! __exit((long)status);
- }
-
- - /* extern int main(); causes unnecessary pain with protos */
- -
- void _main(argc, argv, environ)
- long argc;
- char **argv;
- char **environ;
- {
- ! __exit((long)(main((int)argc, argv, environ)));
- }
-
- ! #if defined(__cplusplus)
- }
- #endif
- -
- --- 34,72 ----
- return 0;
- }
-
- + #else
- +
- + __EXTERN __EXITING _exit __PROTO((int));
- + #define __exit _exit
- +
- + #endif /* __MINT__ */
- +
- + void _init_signal __PROTO((void));
- + void exit __PROTO((int status));
- + void _main __PROTO((long argc, char **argv, char **environ));
- +
- +
- void
- ! _init_signal()
- {
- }
-
- ! __EXITING
- ! exit(status)
- int status;
- {
- ! __exit(status);
- }
-
- void _main(argc, argv, environ)
- long argc;
- char **argv;
- char **environ;
- {
- ! __EXTERN int main __PROTO((int, char **, char **));
- ! exit(main((int)argc, argv, environ));
- }
-
- ! #ifdef __cplusplus
- }
- #endif
- *** 1.7 1992/03/10 15:22:18
- --- mintbind.h 1992/06/03 15:27:01
- ***************
- *** 1,19 ****
- #ifndef _MINTBIND_H
- #define _MINTBIND_H
-
- ! #ifdef __MINT__
- !
- ! #if defined(__cplusplus)
- ! extern "C" {
- #endif
-
- !
- ! #ifndef _OSBIND_H
- ! #include <osbind.h>
- #endif
-
- ! #if defined(__GNUC__) && !defined(__NO_INLINE__)
- !
- #define trap_1_wwlw(n, a, b, c) \
- ({ \
- register long retvalue __asm__("d0"); \
- --- 1,21 ----
- #ifndef _MINTBIND_H
- #define _MINTBIND_H
-
- ! #ifdef __TURBOC__
- ! # ifndef __TOS
- ! # include <tos.h>
- ! # endif
- ! #else
- ! # ifndef _OSBIND_H
- ! # include <osbind.h>
- ! # endif
- #endif
-
- ! #ifdef __cplusplus
- ! extern "C" {
- #endif
-
- ! #ifdef __GNUC_INLINE__
- #define trap_1_wwlw(n, a, b, c) \
- ({ \
- register long retvalue __asm__("d0"); \
- ***************
- *** 79,103 ****
- })
-
- #else
- ! # ifdef __MSHORT__
- ! # ifndef trap_1_w
- ! # define trap_1_w(n) gemdos(n)
- ! # define trap_1_wl(n,a) gemdos(n, (long)(a))
- ! # define trap_1_ww(n,a) gemdos(n, a)
- ! # define trap_1_www(n,a,b) gemdos(n, a, b)
- ! # define trap_1_wlww(n,a,b,c) gemdos(n, a, b, c)
- ! # define trap_13_w(n) bios(n)
- ! # define trap_14_w(n) xbios(n)
- ! # endif
- ! # define trap_1_wwlw(n,a,b,c) gemdos(n, a, (long)b, c)
- ! # define trap_1_wwl(n, a, b) gemdos(n, a, (long)b)
- # endif
- #endif
-
- #define Syield() \
- ! trap_1_w(0xff)
- #define Fpipe(ptr) \
- ! trap_1_wl(0x100, (long)(ptr))
- #define Fcntl(f, arg, cmd) \
- trap_1_wwlw(0x104, (short)(f), (long)(arg), (short)(cmd))
- #define Finstat(f) \
- --- 81,118 ----
- })
-
- #else
- !
- ! #ifdef __GNUC__
- ! # ifndef __MSHORT__
- ! # define __LONG_TRAPS__
- # endif
- #endif
-
- + #ifndef __LONG_TRAPS__
- + # ifndef trap_1_w
- + # define trap_1_w(n) gemdos(n)
- + # define trap_1_wl(n,a) gemdos(n, (long)(a))
- + # define trap_1_wll(n, a, b) gemdos(n, (long)(a), (long)(b))
- + # define trap_1_ww(n,a) gemdos(n, a)
- + # define trap_1_www(n,a,b) gemdos(n, a, b)
- + # define trap_1_wwlll(n,a,b,c,d) gemdos(n, a, (long)(b), (long)(c), (long)(d))
- + # define trap_1_wwll(n, a, b, c) gemdos(n, a, (long)(b), (long)(c))
- + # define trap_1_wlw(n, a, b) gemdos(n, (long)(a), b)
- + # define trap_1_wlww(n, a, b, c) gemdos(n, (long)(a), b, c)
- + # define trap_13_w(n) bios(n)
- + # define trap_14_w(n) xbios(n)
- + # endif
- + # define trap_1_wwlw(n,a,b,c) gemdos(n, a, (long)(b), c)
- + # define trap_1_wwww(n,a,b,c) gemdos(n, a, b, c)
- + # define trap_1_wwl(n, a, b) gemdos(n, a, (long)(b))
- + #endif /* __LONG_TRAPS__ */
- +
- + #endif /* __GNUC_INLINE__ */
- +
- #define Syield() \
- ! (int)trap_1_w(0xff)
- #define Fpipe(ptr) \
- ! (int)trap_1_wl(0x100, (long)(ptr))
- #define Fcntl(f, arg, cmd) \
- trap_1_wwlw(0x104, (short)(f), (long)(arg), (short)(cmd))
- #define Finstat(f) \
- ***************
- *** 112,140 ****
- #define Pwait() \
- trap_1_w(0x109)
- #define Pnice(delta) \
- ! trap_1_ww(0x10a, (short)(delta))
- #define Pgetpid() \
- ! trap_1_w(0x10b)
- #define Pgetppid() \
- ! trap_1_w(0x10c)
- #define Pgetpgrp() \
- ! trap_1_w(0x10d)
- #define Psetpgrp(pid, grp) \
- ! trap_1_www(0x10e, (short)(pid), (short)(grp))
- #define Pgetuid() \
- ! trap_1_w(0x10f)
- #define Psetuid(id) \
- ! trap_1_ww(0x110, (short)(id))
- #define Pkill(pid, sig) \
- ! trap_1_www(0x111, (short)(pid), (short)(sig))
- #define Psignal(sig, handler) \
- trap_1_wwl(0x112, (short)(sig), (long)(handler))
- #define Pvfork() \
- trap_1_w(0x113)
- #define Pgetgid() \
- ! trap_1_w(0x114)
- #define Psetgid(id) \
- ! trap_1_ww(0x115, (short)(id))
- #define Psigblock(mask) \
- trap_1_wl(0x116, (unsigned long)(mask))
- #define Psigsetmask(mask) \
- --- 127,155 ----
- #define Pwait() \
- trap_1_w(0x109)
- #define Pnice(delta) \
- ! (int)trap_1_ww(0x10a, (short)(delta))
- #define Pgetpid() \
- ! (int)trap_1_w(0x10b)
- #define Pgetppid() \
- ! (int)trap_1_w(0x10c)
- #define Pgetpgrp() \
- ! (int)trap_1_w(0x10d)
- #define Psetpgrp(pid, grp) \
- ! (int)trap_1_www(0x10e, (short)(pid), (short)(grp))
- #define Pgetuid() \
- ! (int)trap_1_w(0x10f)
- #define Psetuid(id) \
- ! (int)trap_1_ww(0x110, (short)(id))
- #define Pkill(pid, sig) \
- ! (int)trap_1_www(0x111, (short)(pid), (short)(sig))
- #define Psignal(sig, handler) \
- trap_1_wwl(0x112, (short)(sig), (long)(handler))
- #define Pvfork() \
- trap_1_w(0x113)
- #define Pgetgid() \
- ! (int)trap_1_w(0x114)
- #define Psetgid(id) \
- ! (int)trap_1_ww(0x115, (short)(id))
- #define Psigblock(mask) \
- trap_1_wl(0x116, (unsigned long)(mask))
- #define Psigsetmask(mask) \
- ***************
- *** 142,159 ****
- #define Pusrval(arg) \
- trap_1_wl(0x118, (long)(arg))
- #define Pdomain(arg) \
- ! trap_1_ww(0x119, (short)(arg))
- #define Psigreturn() \
- ! trap_1_w(0x11a)
- #define Pfork() \
- trap_1_w(0x11b)
- #define Pwait3(flag, rusage) \
- trap_1_wwl(0x11c, (short)(flag), (long)(rusage))
- #define Fselect(time, rfd, wfd, xfd) \
- ! trap_1_wwlll(0x11d, (unsigned short)(time), (long)(rfd), \
- (long)(wfd), (long)(xfd))
- #define Prusage(rsp) \
- ! trap_1_wl(0x11e, (long)(rsp))
- #define Psetlimit(i, val) \
- trap_1_wwl(0x11f, (short)(i), (long)(val))
-
- --- 157,174 ----
- #define Pusrval(arg) \
- trap_1_wl(0x118, (long)(arg))
- #define Pdomain(arg) \
- ! (int)trap_1_ww(0x119, (short)(arg))
- #define Psigreturn() \
- ! (void)trap_1_w(0x11a)
- #define Pfork() \
- trap_1_w(0x11b)
- #define Pwait3(flag, rusage) \
- trap_1_wwl(0x11c, (short)(flag), (long)(rusage))
- #define Fselect(time, rfd, wfd, xfd) \
- ! (int)trap_1_wwlll(0x11d, (unsigned short)(time), (long)(rfd), \
- (long)(wfd), (long)(xfd))
- #define Prusage(rsp) \
- ! (int)trap_1_wl(0x11e, (long)(rsp))
- #define Psetlimit(i, val) \
- trap_1_wwl(0x11f, (short)(i), (long)(val))
-
- ***************
- *** 160,166 ****
- #define Talarm(sec) \
- trap_1_wl(0x120, (long)(sec))
- #define Pause() \
- ! trap_1_w(0x121);
- #define Sysconf(n) \
- trap_1_ww(0x122, (short)(n))
- #define Psigpending() \
- --- 175,181 ----
- #define Talarm(sec) \
- trap_1_wl(0x120, (long)(sec))
- #define Pause() \
- ! (void)trap_1_w(0x121)
- #define Sysconf(n) \
- trap_1_ww(0x122, (short)(n))
- #define Psigpending() \
- ***************
- *** 173,179 ****
- #define Fmidipipe(pid, in, out) \
- trap_1_wwww(0x126, (short)(pid), (short)(in),(short)(out))
- #define Prenice(pid, delta) \
- ! trap_1_www(0x127, (short)(pid), (short)(delta))
- #define Dopendir(name, flag) \
- trap_1_wlw(0x128, (long)(name), (short)(flag))
- #define Dreaddir(len, handle, buf) \
- --- 188,194 ----
- #define Fmidipipe(pid, in, out) \
- trap_1_wwww(0x126, (short)(pid), (short)(in),(short)(out))
- #define Prenice(pid, delta) \
- ! (int)trap_1_www(0x127, (short)(pid), (short)(delta))
- #define Dopendir(name, flag) \
- trap_1_wlw(0x128, (long)(name), (short)(flag))
- #define Dreaddir(len, handle, buf) \
- ***************
- *** 197,218 ****
- #define Fchmod(name, mode) \
- trap_1_wlw(0x132, (long)(name), (short)(mode))
- #define Pumask(mask) \
- ! trap_1_ww(0x133, (short)(mask))
- #define Psemaphore(mode, id, tmout) \
- trap_1_wwll(0x134, (short)(mode), (long)(id), (long)(tmout))
- #define Dlock(mode, drive) \
- ! trap_1_www(0x135, (short)(mode), (short)(drive))
- !
- ! #define Dos_tab() \
- ! trap_1_w(-1)
- ! #define Bios_tab() \
- ! trap_13_w(-1)
- ! #define Xbios_tab() \
- ! trap_14_w(-1)
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- - #endif /* __MINT__ */
- #endif /* _MINTBIND_H */
- --- 212,229 ----
- #define Fchmod(name, mode) \
- trap_1_wlw(0x132, (long)(name), (short)(mode))
- #define Pumask(mask) \
- ! (int)trap_1_ww(0x133, (short)(mask))
- #define Psemaphore(mode, id, tmout) \
- trap_1_wwll(0x134, (short)(mode), (long)(id), (long)(tmout))
- #define Dlock(mode, drive) \
- ! (int)trap_1_www(0x135, (short)(mode), (short)(drive))
- ! #define Psigpause(mask) \
- ! (void)trap_1_wl(0x136, (unsigned long)(mask))
- ! #define Psigaction(sig, act, oact) \
- ! trap_1_wwll(0x137, (short)(sig), (long)(act), (long)(oact))
-
- ! #ifdef __cplusplus
- }
- #endif
-
- #endif /* _MINTBIND_H */
- *** 1.3 1991/06/20 02:21:30
- --- mouse.h 1992/06/03 15:27:01
- ***************
- *** 1,7 ****
- #ifndef _MOUSE_H
- #define _MOUSE_H
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 1,7 ----
- #ifndef _MOUSE_H
- #define _MOUSE_H
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 17,23 ****
- #define M_RIGHT_BUTTON 0x01
- #define M_MID_BUTTON 0x00 /* there is none! */
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 17,23 ----
- #define M_RIGHT_BUTTON 0x01
- #define M_MID_BUTTON 0x00 /* there is none! */
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.3 1990/03/04 04:17:18
- --- obstack.h 1992/06/03 15:27:02
- ***************
- *** 3,9 ****
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- ! Free Software Foundation; either version 1, or (at your option) any
- later version.
-
- This program is distributed in the hope that it will be useful,
- --- 3,9 ----
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- ! Free Software Foundation; either version 2, or (at your option) any
- later version.
-
- This program is distributed in the hope that it will be useful,
- ***************
- *** 13,26 ****
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- ! Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-
- -
- - In other words, you are welcome to use, share and improve this program.
- - You are forbidden to forbid anyone else to use, share and improve
- - what you give them. Help stamp out software-hoarding! */
- -
- -
- /* Summary:
-
- All the apparent functions defined here are macros. The idea
- --- 13,20 ----
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- ! Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
-
- /* Summary:
-
- All the apparent functions defined here are macros. The idea
- ***************
- *** 109,114 ****
- --- 103,116 ----
- #ifndef __OBSTACKS__
- #define __OBSTACKS__
-
- +
- + #include <compiler.h> /* so that the defs here and in obstack.c dont use
- + the type int so blindly */
- + #ifndef _SIZE_T
- + #define _SIZE_T __SIZE_TYPEDEF__
- + typedef _SIZE_T size_t;
- + #endif
- +
- /* We use subtraction of (char *)0 instead of casting to int
- because on word-addressable machines a simple cast to int
- may ignore the byte-within-word field of the pointer. */
- ***************
- *** 130,145 ****
-
- struct obstack /* control current object in current chunk */
- {
- ! long chunk_size; /* preferred size to allocate chunks in */
- struct _obstack_chunk* chunk; /* address of current struct obstack_chunk */
- char *object_base; /* address of object we are building */
- char *next_free; /* where to add next char to current object */
- char *chunk_limit; /* address of char after current chunk */
- ! int temp; /* Temporary for some macros. */
- int alignment_mask; /* Mask of alignment for each object. */
- struct _obstack_chunk *(*chunkfun) (); /* User's fcn to allocate a chunk. */
- void (*freefun) (); /* User's function to free a chunk. */
- };
-
- #ifdef __STDC__
-
- --- 132,164 ----
-
- struct obstack /* control current object in current chunk */
- {
- ! size_t chunk_size; /* preferred size to allocate chunks in */
- struct _obstack_chunk* chunk; /* address of current struct obstack_chunk */
- char *object_base; /* address of object we are building */
- char *next_free; /* where to add next char to current object */
- char *chunk_limit; /* address of char after current chunk */
- ! long temp; /* Temporary for some macros. */
- int alignment_mask; /* Mask of alignment for each object. */
- struct _obstack_chunk *(*chunkfun) (); /* User's fcn to allocate a chunk. */
- void (*freefun) (); /* User's function to free a chunk. */
- + /* Nonzero means there is a possibility the current chunk contains
- + a zero-length object. This prevents freeing the chunk
- + if we allocate a bigger chunk to replace it. */
- + char maybe_empty_object;
- };
- +
- + /* Declare the external functions we use; they are in obstack.c. */
- +
- + #ifdef __STDC__
- + extern void _obstack_newchunk (struct obstack *, size_t);
- + extern void _obstack_free (struct obstack *, void *);
- + extern void _obstack_begin (struct obstack *, size_t, int,
- + void *(*) (), void (*) ());
- + #else
- + extern void _obstack_newchunk ();
- + extern void _obstack_free ();
- + extern void _obstack_begin ();
- + #endif
-
- #ifdef __STDC__
-
- ***************
- *** 148,183 ****
-
- void obstack_init (struct obstack *obstack);
-
- ! void * obstack_alloc (struct obstack *obstack, int size);
-
- ! void * obstack_copy (struct obstack *obstack, void *address, int size);
- ! void * obstack_copy0 (struct obstack *obstack, void *address, int size);
-
- void obstack_free (struct obstack *obstack, void *block);
-
- ! void obstack_blank (struct obstack *obstack, int size);
-
- ! void obstack_grow (struct obstack *obstack, void *data, int size);
- ! void obstack_grow0 (struct obstack *obstack, void *data, int size);
-
- void obstack_1grow (struct obstack *obstack, int data_char);
- void obstack_ptr_grow (struct obstack *obstack, void *data);
- void obstack_int_grow (struct obstack *obstack, int data);
-
- void * obstack_finish (struct obstack *obstack);
-
- ! int obstack_object_size (struct obstack *obstack);
-
- ! int obstack_room (struct obstack *obstack);
- void obstack_1grow_fast (struct obstack *obstack, int data_char);
- void obstack_ptr_grow_fast (struct obstack *obstack, void *data);
- void obstack_int_grow_fast (struct obstack *obstack, int data);
- ! void obstack_blank_fast (struct obstack *obstack, int size);
-
- void * obstack_base (struct obstack *obstack);
- void * obstack_next_free (struct obstack *obstack);
- int obstack_alignment_mask (struct obstack *obstack);
- ! int obstack_chunk_size (struct obstack *obstack);
-
- #endif /* __STDC__ */
-
- --- 167,203 ----
-
- void obstack_init (struct obstack *obstack);
-
- ! void * obstack_alloc (struct obstack *obstack, size_t size);
-
- ! void * obstack_copy (struct obstack *obstack, void *address, size_t size);
- ! void * obstack_copy0 (struct obstack *obstack, void *address, size_t size);
-
- void obstack_free (struct obstack *obstack, void *block);
-
- ! void obstack_blank (struct obstack *obstack, size_t size);
-
- ! void obstack_grow (struct obstack *obstack, void *data, size_t size);
- ! void obstack_grow0 (struct obstack *obstack, void *data, size_t size);
-
- void obstack_1grow (struct obstack *obstack, int data_char);
- void obstack_ptr_grow (struct obstack *obstack, void *data);
- void obstack_int_grow (struct obstack *obstack, int data);
- + void obstack_long_grow (struct obstack *obstack, long data);
-
- void * obstack_finish (struct obstack *obstack);
-
- ! size_t obstack_object_size (struct obstack *obstack);
-
- ! size_t obstack_room (struct obstack *obstack);
- void obstack_1grow_fast (struct obstack *obstack, int data_char);
- void obstack_ptr_grow_fast (struct obstack *obstack, void *data);
- void obstack_int_grow_fast (struct obstack *obstack, int data);
- ! void obstack_blank_fast (struct obstack *obstack, size_t size);
-
- void * obstack_base (struct obstack *obstack);
- void * obstack_next_free (struct obstack *obstack);
- int obstack_alignment_mask (struct obstack *obstack);
- ! size_t obstack_chunk_size (struct obstack *obstack);
-
- #endif /* __STDC__ */
-
- ***************
- *** 203,218 ****
- #define obstack_alignment_mask(h) ((h)->alignment_mask)
-
- #define obstack_init(h) \
- ! _obstack_begin ((h), 0, 0, obstack_chunk_alloc, obstack_chunk_free)
-
- #define obstack_begin(h, size) \
- ! _obstack_begin ((h), (size), 0, obstack_chunk_alloc, obstack_chunk_free)
-
- #define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = achar)
-
- #define obstack_blank_fast(h,n) ((h)->next_free += (n))
-
- ! #if defined (__GNUC__) && defined (__STDC__)
-
- /* For GNU C, if not -traditional,
- we can define these macros to compute all args only once
- --- 223,244 ----
- #define obstack_alignment_mask(h) ((h)->alignment_mask)
-
- #define obstack_init(h) \
- ! _obstack_begin ((h), 0L, 0, \
- ! (void *(*) ()) obstack_chunk_alloc, obstack_chunk_free)
-
- #define obstack_begin(h, size) \
- ! _obstack_begin ((h), ((size_t)(size)), 0, \
- ! (void *(*) ()) obstack_chunk_alloc, obstack_chunk_free)
-
- #define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = achar)
-
- #define obstack_blank_fast(h,n) ((h)->next_free += (n))
-
- ! #ifdef __STDC__
- ! #ifdef __GNUC__
- ! #if __GNUC__ < 2
- ! #define __extension__
- ! #endif
-
- /* For GNU C, if not -traditional,
- we can define these macros to compute all args only once
- ***************
- *** 220,246 ****
- Also, we can avoid using the `temp' slot, to make faster code. */
-
- #define obstack_object_size(OBSTACK) \
- ({ struct obstack *__o = (OBSTACK); \
- ! (unsigned) (__o->next_free - __o->object_base); })
-
- #define obstack_room(OBSTACK) \
- ({ struct obstack *__o = (OBSTACK); \
- ! (unsigned) (__o->chunk_limit - __o->next_free); })
-
- #define obstack_grow(OBSTACK,where,length) \
- ({ struct obstack *__o = (OBSTACK); \
- ! int __len = (length); \
- ((__o->next_free + __len > __o->chunk_limit) \
- ! ? _obstack_newchunk (__o, __len) : 0); \
- bcopy (where, __o->next_free, __len); \
- __o->next_free += __len; \
- (void) 0; })
-
- #define obstack_grow0(OBSTACK,where,length) \
- ({ struct obstack *__o = (OBSTACK); \
- ! int __len = (length); \
- ((__o->next_free + __len + 1 > __o->chunk_limit) \
- ! ? _obstack_newchunk (__o, __len + 1) : 0), \
- bcopy (where, __o->next_free, __len), \
- __o->next_free += __len, \
- *(__o->next_free)++ = 0; \
- --- 246,281 ----
- Also, we can avoid using the `temp' slot, to make faster code. */
-
- #define obstack_object_size(OBSTACK) \
- + __extension__ \
- ({ struct obstack *__o = (OBSTACK); \
- ! (size_t) (__o->next_free - __o->object_base); })
-
- #define obstack_room(OBSTACK) \
- + __extension__ \
- ({ struct obstack *__o = (OBSTACK); \
- ! (size_t) (__o->chunk_limit - __o->next_free); })
-
- + /* Note that the call to _obstack_newchunk is enclosed in (..., 0)
- + so that we can avoid having void expressions
- + in the arms of the conditional expression.
- + Casting the third operand to void was tried before,
- + but some compilers won't accept it. */
- #define obstack_grow(OBSTACK,where,length) \
- + __extension__ \
- ({ struct obstack *__o = (OBSTACK); \
- ! size_t __len = (length); \
- ((__o->next_free + __len > __o->chunk_limit) \
- ! ? (_obstack_newchunk (__o, __len), 0) : 0); \
- bcopy (where, __o->next_free, __len); \
- __o->next_free += __len; \
- (void) 0; })
-
- #define obstack_grow0(OBSTACK,where,length) \
- + __extension__ \
- ({ struct obstack *__o = (OBSTACK); \
- ! size_t __len = (length); \
- ((__o->next_free + __len + 1 > __o->chunk_limit) \
- ! ? (_obstack_newchunk (__o, __len + 1), 0) : 0), \
- bcopy (where, __o->next_free, __len), \
- __o->next_free += __len, \
- *(__o->next_free)++ = 0; \
- ***************
- *** 247,255 ****
- (void) 0; })
-
- #define obstack_1grow(OBSTACK,datum) \
- ({ struct obstack *__o = (OBSTACK); \
- ((__o->next_free + 1 > __o->chunk_limit) \
- ! ? _obstack_newchunk (__o, 1) : 0), \
- *(__o->next_free)++ = (datum); \
- (void) 0; })
-
- --- 282,291 ----
- (void) 0; })
-
- #define obstack_1grow(OBSTACK,datum) \
- + __extension__ \
- ({ struct obstack *__o = (OBSTACK); \
- ((__o->next_free + 1 > __o->chunk_limit) \
- ! ? (_obstack_newchunk (__o, 1), 0) : 0), \
- *(__o->next_free)++ = (datum); \
- (void) 0; })
-
- ***************
- *** 258,384 ****
- shares that much alignment. */
-
- #define obstack_ptr_grow(OBSTACK,datum) \
- ({ struct obstack *__o = (OBSTACK); \
- ((__o->next_free + sizeof (void *) > __o->chunk_limit) \
- ! ? _obstack_newchunk (__o, sizeof (void *)) : 0), \
- *((void **)__o->next_free)++ = ((void *)datum); \
- (void) 0; })
-
- #define obstack_int_grow(OBSTACK,datum) \
- ({ struct obstack *__o = (OBSTACK); \
- ((__o->next_free + sizeof (int) > __o->chunk_limit) \
- ! ? _obstack_newchunk (__o, sizeof (int)) : 0), \
- *((int *)__o->next_free)++ = ((int)datum); \
- (void) 0; })
-
- #define obstack_ptr_grow_fast(h,aptr) (*((void **)(h)->next_free)++ = (void *)aptr)
- #define obstack_int_grow_fast(h,aint) (*((int *)(h)->next_free)++ = (int)aint)
-
- #define obstack_blank(OBSTACK,length) \
- ({ struct obstack *__o = (OBSTACK); \
- ! int __len = (length); \
- ! ((__o->next_free + __len > __o->chunk_limit) \
- ! ? _obstack_newchunk (__o, __len) : 0); \
- __o->next_free += __len; \
- (void) 0; })
-
- #define obstack_alloc(OBSTACK,length) \
- ({ struct obstack *__h = (OBSTACK); \
- obstack_blank (__h, (length)); \
- obstack_finish (__h); })
-
- #define obstack_copy(OBSTACK,where,length) \
- ({ struct obstack *__h = (OBSTACK); \
- obstack_grow (__h, (where), (length)); \
- obstack_finish (__h); })
-
- #define obstack_copy0(OBSTACK,where,length) \
- ({ struct obstack *__h = (OBSTACK); \
- obstack_grow0 (__h, (where), (length)); \
- obstack_finish (__h); })
-
- #define obstack_finish(OBSTACK) \
- ! ({ struct obstack *__o = (OBSTACK); \
- ! void *value = (void *) __o->object_base; \
- ! __o->next_free \
- ! = __INT_TO_PTR ((__PTR_TO_INT (__o->next_free)+__o->alignment_mask)\
- ! & ~ (__o->alignment_mask)); \
- ! ((__o->next_free - (char *)__o->chunk \
- ! > __o->chunk_limit - (char *)__o->chunk) \
- ! ? (__o->next_free = __o->chunk_limit) : 0); \
- ! __o->object_base = __o->next_free; \
- value; })
-
- #define obstack_free(OBSTACK, OBJ) \
- ({ struct obstack *__o = (OBSTACK); \
- void *__obj = (OBJ); \
- ! if (__obj >= (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \
- __o->next_free = __o->object_base = __obj; \
- else (obstack_free) (__o, __obj); })
-
- ! #else /* not __GNUC__ or not __STDC__ */
- !
- ! /* The non-GNU macros copy the obstack-pointer into this global variable
- ! to avoid multiple evaluation. */
-
- ! extern struct obstack *_obstack;
-
- #define obstack_object_size(h) \
- ! (unsigned) (_obstack = (h), (h)->next_free - (h)->object_base)
-
- #define obstack_room(h) \
- ! (unsigned) (_obstack = (h), (h)->chunk_limit - (h)->next_free)
-
- #define obstack_grow(h,where,length) \
- ( (h)->temp = (length), \
- (((h)->next_free + (h)->temp > (h)->chunk_limit) \
- ! ? _obstack_newchunk ((h), (h)->temp) : 0), \
- ! bcopy (where, (h)->next_free, (h)->temp), \
- (h)->next_free += (h)->temp)
-
- #define obstack_grow0(h,where,length) \
- ( (h)->temp = (length), \
- (((h)->next_free + (h)->temp + 1 > (h)->chunk_limit) \
- ! ? _obstack_newchunk ((h), (h)->temp + 1) : 0), \
- ! bcopy (where, (h)->next_free, (h)->temp), \
- (h)->next_free += (h)->temp, \
- *((h)->next_free)++ = 0)
-
- #define obstack_1grow(h,datum) \
- ( (((h)->next_free + 1 > (h)->chunk_limit) \
- ! ? _obstack_newchunk ((h), 1) : 0), \
- *((h)->next_free)++ = (datum))
-
- #define obstack_ptr_grow(h,datum) \
- ( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \
- ! ? _obstack_newchunk ((h), sizeof (char *)) : 0), \
- ! *((char **)(h)->next_free)++ = ((char *)datum))
-
- #define obstack_int_grow(h,datum) \
- ( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \
- ! ? _obstack_newchunk ((h), sizeof (int)) : 0), \
- ! *((int *)(h)->next_free)++ = ((int)datum))
-
- #define obstack_ptr_grow_fast(h,aptr) (*((char **)(h)->next_free)++ = (char *)aptr)
- #define obstack_int_grow_fast(h,aint) (*((int *)(h)->next_free)++ = (int)aint)
-
- #define obstack_blank(h,length) \
- ( (h)->temp = (length), \
- ! (((h)->next_free + (h)->temp > (h)->chunk_limit) \
- ! ? _obstack_newchunk ((h), (h)->temp) : 0), \
- (h)->next_free += (h)->temp)
-
- #define obstack_alloc(h,length) \
- ! (obstack_blank ((h), (length)), obstack_finish ((h)))
-
- #define obstack_copy(h,where,length) \
- ! (obstack_grow ((h), (where), (length)), obstack_finish ((h)))
-
- #define obstack_copy0(h,where,length) \
- ! (obstack_grow0 ((h), (where), (length)), obstack_finish ((h)))
-
- #define obstack_finish(h) \
- ! ( (h)->temp = __PTR_TO_INT ((h)->object_base), \
- (h)->next_free \
- = __INT_TO_PTR ((__PTR_TO_INT ((h)->next_free)+(h)->alignment_mask) \
- & ~ ((h)->alignment_mask)), \
- --- 294,447 ----
- shares that much alignment. */
-
- #define obstack_ptr_grow(OBSTACK,datum) \
- + __extension__ \
- ({ struct obstack *__o = (OBSTACK); \
- ((__o->next_free + sizeof (void *) > __o->chunk_limit) \
- ! ? (_obstack_newchunk (__o, sizeof (void *)), 0) : 0), \
- *((void **)__o->next_free)++ = ((void *)datum); \
- (void) 0; })
-
- #define obstack_int_grow(OBSTACK,datum) \
- + __extension__ \
- ({ struct obstack *__o = (OBSTACK); \
- ((__o->next_free + sizeof (int) > __o->chunk_limit) \
- ! ? (_obstack_newchunk (__o, sizeof (int)), 0) : 0), \
- *((int *)__o->next_free)++ = ((int)datum); \
- (void) 0; })
-
- + #define obstack_long_grow(OBSTACK,datum) \
- + __extension__ \
- + ({ struct obstack *__o = (OBSTACK); \
- + ((__o->next_free + sizeof (long) > __o->chunk_limit) \
- + ? (_obstack_newchunk (__o, sizeof (long)), 0) : 0), \
- + *((long *)__o->next_free)++ = ((long)datum); \
- + (void) 0; })
- +
- #define obstack_ptr_grow_fast(h,aptr) (*((void **)(h)->next_free)++ = (void *)aptr)
- #define obstack_int_grow_fast(h,aint) (*((int *)(h)->next_free)++ = (int)aint)
- + #define obstack_long_grow_fast(h,along) (*((long *)(h)->next_free)++ = (long)along)
-
- #define obstack_blank(OBSTACK,length) \
- + __extension__ \
- ({ struct obstack *__o = (OBSTACK); \
- ! size_t __len = (length); \
- ! ((__o->chunk_limit - __o->next_free < __len) \
- ! ? (_obstack_newchunk (__o, __len), 0) : 0); \
- __o->next_free += __len; \
- (void) 0; })
-
- #define obstack_alloc(OBSTACK,length) \
- + __extension__ \
- ({ struct obstack *__h = (OBSTACK); \
- obstack_blank (__h, (length)); \
- obstack_finish (__h); })
-
- #define obstack_copy(OBSTACK,where,length) \
- + __extension__ \
- ({ struct obstack *__h = (OBSTACK); \
- obstack_grow (__h, (where), (length)); \
- obstack_finish (__h); })
-
- #define obstack_copy0(OBSTACK,where,length) \
- + __extension__ \
- ({ struct obstack *__h = (OBSTACK); \
- obstack_grow0 (__h, (where), (length)); \
- obstack_finish (__h); })
-
- + /* The local variable is named __o1 to avoid a name conflict
- + when obstack_blank is called. */
- #define obstack_finish(OBSTACK) \
- ! __extension__ \
- ! ({ struct obstack *__o1 = (OBSTACK); \
- ! void *value = (void *) __o1->object_base; \
- ! if (__o1->next_free == value) \
- ! __o1->maybe_empty_object = 1; \
- ! __o1->next_free \
- ! = __INT_TO_PTR ((__PTR_TO_INT (__o1->next_free)+__o1->alignment_mask)\
- ! & ~ (__o1->alignment_mask)); \
- ! ((__o1->next_free - (char *)__o1->chunk \
- ! > __o1->chunk_limit - (char *)__o1->chunk) \
- ! ? (__o1->next_free = __o1->chunk_limit) : 0); \
- ! __o1->object_base = __o1->next_free; \
- value; })
-
- #define obstack_free(OBSTACK, OBJ) \
- + __extension__ \
- ({ struct obstack *__o = (OBSTACK); \
- void *__obj = (OBJ); \
- ! if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \
- __o->next_free = __o->object_base = __obj; \
- else (obstack_free) (__o, __obj); })
-
- ! #endif /* __GNUC__ */
-
- ! #else /* not __GNUC__ or not __STDC__ */
-
- #define obstack_object_size(h) \
- ! (size_t) ((h)->next_free - (h)->object_base)
-
- #define obstack_room(h) \
- ! (size_t) ((h)->chunk_limit - (h)->next_free)
-
- #define obstack_grow(h,where,length) \
- ( (h)->temp = (length), \
- (((h)->next_free + (h)->temp > (h)->chunk_limit) \
- ! ? (_obstack_newchunk ((h), (size_t)(h)->temp), 0) : 0), \
- ! bcopy (where, (h)->next_free, (size_t)((h)->temp)), \
- (h)->next_free += (h)->temp)
-
- #define obstack_grow0(h,where,length) \
- ( (h)->temp = (length), \
- (((h)->next_free + (h)->temp + 1 > (h)->chunk_limit) \
- ! ? (_obstack_newchunk ((h), (size_t)(h)->temp + 1), 0) : 0), \
- ! bcopy (where, (h)->next_free, (size_t)((h)->temp)), \
- (h)->next_free += (h)->temp, \
- *((h)->next_free)++ = 0)
-
- #define obstack_1grow(h,datum) \
- ( (((h)->next_free + 1 > (h)->chunk_limit) \
- ! ? (_obstack_newchunk ((h), 1L), 0) : 0), \
- *((h)->next_free)++ = (datum))
-
- #define obstack_ptr_grow(h,datum) \
- ( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \
- ! ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \
- ! *((char **)(((h)->next_free+=sizeof(char *))-sizeof(char *))) = ((char *)datum))
-
- #define obstack_int_grow(h,datum) \
- ( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \
- ! ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \
- ! *((int *)(((h)->next_free+=sizeof(int))-sizeof(int))) = ((int)datum))
-
- + #define obstack_long_grow(h,datum) \
- + ( (((h)->next_free + sizeof (long) > (h)->chunk_limit) \
- + ? (_obstack_newchunk ((h), sizeof (long)), 0) : 0), \
- + *((long *)(((h)->next_free+=sizeof(long))-sizeof(long))) = ((long)datum))
- +
- #define obstack_ptr_grow_fast(h,aptr) (*((char **)(h)->next_free)++ = (char *)aptr)
- #define obstack_int_grow_fast(h,aint) (*((int *)(h)->next_free)++ = (int)aint)
- + #define obstack_long_grow_fast(h,along) (*((long *)(h)->next_free)++ = (long)along)
-
- #define obstack_blank(h,length) \
- ( (h)->temp = (length), \
- ! (((h)->chunk_limit - (h)->next_free < (h)->temp) \
- ! ? (_obstack_newchunk ((h), (size_t)(h)->temp), 0) : 0), \
- (h)->next_free += (h)->temp)
-
- #define obstack_alloc(h,length) \
- ! (obstack_blank ((h), (size_t)(length)), obstack_finish ((h)))
-
- #define obstack_copy(h,where,length) \
- ! (obstack_grow ((h), (where), (size_t)(length)), obstack_finish ((h)))
-
- #define obstack_copy0(h,where,length) \
- ! (obstack_grow0 ((h), (where), (size_t)(length)), obstack_finish ((h)))
-
- #define obstack_finish(h) \
- ! ( ((h)->next_free == (h)->object_base \
- ! ? (((h)->maybe_empty_object = 1), 0) \
- ! : 0), \
- ! (h)->temp = __PTR_TO_INT ((h)->object_base), \
- (h)->next_free \
- = __INT_TO_PTR ((__PTR_TO_INT ((h)->next_free)+(h)->alignment_mask) \
- & ~ ((h)->alignment_mask)), \
- ***************
- *** 391,410 ****
- #ifdef __STDC__
- #define obstack_free(h,obj) \
- ( (h)->temp = (char *)(obj) - (char *) (h)->chunk, \
- ! (((h)->temp >= 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
- ? (int) ((h)->next_free = (h)->object_base \
- = (h)->temp + (char *) (h)->chunk) \
- ! : ((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0)))
- #else
- #define obstack_free(h,obj) \
- ( (h)->temp = (char *)(obj) - (char *) (h)->chunk, \
- ! (((h)->temp >= 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
- ? (int) ((h)->next_free = (h)->object_base \
- = (h)->temp + (char *) (h)->chunk) \
- ! : (int) _obstack_free ((h), (h)->temp + (char *) (h)->chunk)))
- #endif
-
- #endif /* not __GNUC__ or not __STDC__ */
-
- #endif /* not __OBSTACKS__ */
- -
- --- 454,472 ----
- #ifdef __STDC__
- #define obstack_free(h,obj) \
- ( (h)->temp = (char *)(obj) - (char *) (h)->chunk, \
- ! (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
- ? (int) ((h)->next_free = (h)->object_base \
- = (h)->temp + (char *) (h)->chunk) \
- ! : (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0)))
- #else
- #define obstack_free(h,obj) \
- ( (h)->temp = (char *)(obj) - (char *) (h)->chunk, \
- ! (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
- ? (int) ((h)->next_free = (h)->object_base \
- = (h)->temp + (char *) (h)->chunk) \
- ! : (_obstack_free ((h), (h)->temp + (char *) (h)->chunk), 0)))
- #endif
-
- #endif /* not __GNUC__ or not __STDC__ */
-
- #endif /* not __OBSTACKS__ */
- *** 1.26 1992/03/22 22:05:23
- --- osbind.h 1992/06/03 15:27:02
- ***************
- *** 99,105 ****
- #ifndef _OSBIND_H
- #define _OSBIND_H
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 99,109 ----
- #ifndef _OSBIND_H
- #define _OSBIND_H
-
- ! #ifndef _COMPILER_H
- ! #include <compiler.h>
- ! #endif
- !
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 110,116 ****
- /* want to skip all the gory details of GNU C inlines??
- search for the string "DEFINITIONS" */
-
- ! #if ((defined(__GNUC__)) && (!defined(__NO_INLINE__)))
- /*
- * GNU C (pseudo inline) Statement Exprs for traps
- *
- --- 114,120 ----
- /* want to skip all the gory details of GNU C inlines??
- search for the string "DEFINITIONS" */
-
- ! #ifdef __GNUC_INLINE__
- /*
- * GNU C (pseudo inline) Statement Exprs for traps
- *
- ***************
- *** 800,816 ****
- retvalue; \
- })
-
-
- ! #else /* __GNUC__ && !__NO_INLINE__ */
- # ifdef __GNUC__
-
- ! #ifndef __MINT__
- /* if inlines are not allowed, then declare things external */
- -
- - #ifndef _COMPILER_H
- - #include <compiler.h>
- - #endif
- -
- __EXTERN long trap_1_w __PROTO((short n));
- __EXTERN long trap_1_ww __PROTO((short n, short a));
- __EXTERN long trap_1_wl __PROTO((short n, long a));
- --- 804,845 ----
- retvalue; \
- })
-
- + #define trap_14_wwwl(n, a, b, c) \
- + ({ \
- + register long retvalue __asm__("d0"); \
- + short _a = (short)(a); \
- + short _b = (short)(b); \
- + long _c = (long)(c); \
- + \
- + __asm__ volatile \
- + (" \
- + movl %4,sp@-; \
- + movw %3,sp@-; \
- + movw %2,sp@-; \
- + movw %1,sp@-; \
- + trap #14; \
- + addqw #6,sp " \
- + : "=r"(retvalue) /* outputs */ \
- + : "g"(n), "r"(_a), "r"(_b), "r"(_c) /* inputs */ \
- + : "d0", "d1", "d2", "a0", "a1", "a2" /* clobbered regs */ \
- + ); \
- + retvalue; \
- + })
- +
- + #else /* __GNUC_INLINE__ */
-
- ! # ifndef __MSHORT__
- ! # define _TRAP_X_
- ! # else
- # ifdef __GNUC__
- + # ifndef __MINT__
- + # define _TRAP_X_
- + # endif
- + # endif
- + # endif /* !__MSHORT__ */
-
- ! # ifdef _TRAP_X_
- /* if inlines are not allowed, then declare things external */
- __EXTERN long trap_1_w __PROTO((short n));
- __EXTERN long trap_1_ww __PROTO((short n, short a));
- __EXTERN long trap_1_wl __PROTO((short n, long a));
- ***************
- *** 842,854 ****
- __EXTERN long trap_14_wwwwl __PROTO((short n, short a, short b, short c, long d));
- __EXTERN long trap_14_wwwl __PROTO((short n, short a, short b, long c));
-
- ! #endif /* !__MINT__ */
- !
- ! #if defined(__MINT__) && defined(__MSHORT__)
-
- ! /* compilers with 16 bit integers, including gcc -mshort */
- ! extern long gemdos(), bios(), xbios();
- !
- #define trap_1_w gemdos
- #define trap_1_ww gemdos
- #define trap_1_wl gemdos
- --- 871,882 ----
- __EXTERN long trap_14_wwwwl __PROTO((short n, short a, short b, short c, long d));
- __EXTERN long trap_14_wwwl __PROTO((short n, short a, short b, long c));
-
- ! # else /* __TRAP_X__ */
-
- ! __EXTERN long gemdos __PROTO((short, ...));
- ! __EXTERN long bios __PROTO((short, ...));
- ! __EXTERN long xbios __PROTO((short, ...));
- !
- #define trap_1_w gemdos
- #define trap_1_ww gemdos
- #define trap_1_wl gemdos
- ***************
- *** 882,894 ****
- #define trap_14_wllwwwwlw xbios
- #define trap_14_wllwwwwwlw xbios
-
- ! # endif /* __MINT_ && __MSHORT__ */
- !
- ! # else /* !__GNUC__ */
- ! # error "confucious says: \"you've got a brain dead C compiler\""
- ! # endif /* __GNUC__ */
-
- ! #endif /* __GNUC__ && !__NO_INLINE__ */
-
-
- /* DEFINITIONS FOR OS FUNCTIONS */
- --- 910,918 ----
- #define trap_14_wllwwwwlw xbios
- #define trap_14_wllwwwwwlw xbios
-
- ! # endif /* _TRAP_X_ */
-
- ! #endif /* __GNUC_INLINE__ */
-
-
- /* DEFINITIONS FOR OS FUNCTIONS */
- ***************
- *** 1039,1051 ****
- #define Bconin(dev) \
- (long)trap_13_ww((short)(0x02),(short)(dev))
- #define Bconout(dev,c) \
- ! (void)trap_13_www((short)(0x03),(short)(dev),(short)((c) & 0xFF))
- /* since AHDI 3.1 there is a new call to Rwabs with one more parameter */
- #define Rwabs(rwflag,buf,n,sector,d) \
- ! (short)trap_13_wwlwww((short)(0x04),(short)(rwflag),(long)(buf), \
- (short)(n),(short)(sector),(short)(d))
- #define Setexc(vnum,vptr) \
- ! (void (*)(void))trap_13_wwl((short)(0x05),(short)(vnum),(long)(vptr))
- #define Tickcal() \
- (long)trap_13_w((short)(0x06))
- #define Getbpb(d) \
- --- 1063,1075 ----
- #define Bconin(dev) \
- (long)trap_13_ww((short)(0x02),(short)(dev))
- #define Bconout(dev,c) \
- ! (long)trap_13_www((short)(0x03),(short)(dev),(short)((c) & 0xFF))
- /* since AHDI 3.1 there is a new call to Rwabs with one more parameter */
- #define Rwabs(rwflag,buf,n,sector,d) \
- ! (long)trap_13_wwlwww((short)(0x04),(short)(rwflag),(long)(buf), \
- (short)(n),(short)(sector),(short)(d))
- #define Setexc(vnum,vptr) \
- ! (void (*) __PROTO((void)))trap_13_wwl((short)(0x05),(short)(vnum),(long)(vptr))
- #define Tickcal() \
- (long)trap_13_w((short)(0x06))
- #define Getbpb(d) \
- ***************
- *** 1144,1150 ****
- (void)trap_14_wl((short)(0x20),(long)(ptr))
- #define Setprt(config) \
- (short)trap_14_ww((short)(0x21),(short)(config))
- ! #define Kbdvbase() \
- (_KBDVECS*)trap_14_w((short)(0x22))
- #define Kbrate(delay,reprate) \
- (short)trap_14_www((short)(0x23),(short)(delay),(short)(reprate))
- --- 1168,1174 ----
- (void)trap_14_wl((short)(0x20),(long)(ptr))
- #define Setprt(config) \
- (short)trap_14_ww((short)(0x21),(short)(config))
- ! #define Kbdvbase() \
- (_KBDVECS*)trap_14_w((short)(0x22))
- #define Kbrate(delay,reprate) \
- (short)trap_14_www((short)(0x23),(short)(delay),(short)(reprate))
- ***************
- *** 1172,1209 ****
- * extensions for TT TOS
- */
-
- - #if ((defined(__GNUC__)) && (!defined(__NO_INLINE__)))
- - #define trap_14_wwwl(n, a, b, c) \
- - ({ \
- - register long retvalue __asm__("d0"); \
- - short _a = (short)(a); \
- - short _b = (short)(b); \
- - long _c = (long)(c); \
- - \
- - __asm__ volatile \
- - (" \
- - movl %4,sp@-; \
- - movw %3,sp@-; \
- - movw %2,sp@-; \
- - movw %1,sp@-; \
- - trap #14; \
- - addqw #6,sp " \
- - : "=r"(retvalue) /* outputs */ \
- - : "g"(n), "r"(_a), "r"(_b), "r"(_c) /* inputs */ \
- - : "d0", "d1", "d2", "a0", "a1", "a2" /* clobbered regs */ \
- - ); \
- - retvalue; \
- - })
- - #else
- - # ifdef __GNUC__
- - long trap_14_wwwl(short n, short a, short b, long c);
- - # else /* !__GNUC__ */
- - # error "confucious says: \"you've got a brain dead C compiler\""
- - # endif /* __GNUC__ */
- -
- - #endif /* __GNUC__ && !__NO_INLINE__ */
- -
- -
- #define Mxalloc(amt,flag) \
- (long)trap_1_wlw((short)(0x44),(long)(amt),(short)(flag))
- #define Maddalt(start,size) \
- --- 1196,1201 ----
- ***************
- *** 1210,1216 ****
- (long)trap_1_wll((short)(0x14),(long)(start),(long)(size))
-
- #define Setpalette(palptr) \
- ! (void)trap_14_wl((short)(0x06),(long)(palptr))
- #define EsetShift(mode) \
- (void)trap_14_ww((short)(80),(short)mode)
- #define EgetShift() \
- --- 1202,1208 ----
- (long)trap_1_wll((short)(0x14),(long)(start),(long)(size))
-
- #define Setpalette(palptr) \
- ! (void)trap_14_wl((short)(0x06),(long)(palptr))
- #define EsetShift(mode) \
- (void)trap_14_ww((short)(80),(short)mode)
- #define EgetShift() \
- ***************
- *** 1227,1236 ****
- (short)trap_14_ww((short)(86),(short)mode)
- #define EsetSmear(mode) \
- (short)trap_14_ww((short)(87),(short)mode)
- ! #define Bconmap(dev) \
- ! (long)trap_14_ww((short)(0x2b),(short)(dev))
- ! #define Bconctl(opcode,operand) \
- ! (long)trap_14_wwl((short)(0x2d),(short)(opcode),(long)(operand))
-
- /* Wake-up call for ST BOOK -- takes date/time pair in DOS format. */
-
- --- 1219,1236 ----
- (short)trap_14_ww((short)(86),(short)mode)
- #define EsetSmear(mode) \
- (short)trap_14_ww((short)(87),(short)mode)
- !
- ! #define DMAread(sector,count,buffer,devno) \
- ! (long)trap_14_wlwlw((short)0x2a,(long)sector,(short)count,(long)buffer, \
- ! (short)devno)
- ! #define DMAwrite(sector,count,buffer,devno) \
- ! (long)trap_14_wlwlw((short)0x2b,(long)sector,(short)count,(long)buffer, \
- ! (short)devno)
- ! #define Bconmap(dev) \
- ! (long)trap_14_ww((short)0x2c,(short)(dev))
- ! #define NVMaccess(op,start,count,buf) \
- ! (short)trap_14_wwwwl((short)0x2e,(short)op,(short)start,(short)count, \
- ! (long)buf)
-
- /* Wake-up call for ST BOOK -- takes date/time pair in DOS format. */
-
- ***************
- *** 1239,1245 ****
- (unsigned short)(w_time))
-
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 1239,1245 ----
- (unsigned short)(w_time))
-
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.3 1992/03/22 22:05:23
- --- ostruct.h 1992/06/03 15:27:03
- ***************
- *** 1,9 ****
- #ifndef _OSTRUCT_H
- #define _OSTRUCT_H
-
- #include <compiler.h>
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 1,11 ----
- #ifndef _OSTRUCT_H
- #define _OSTRUCT_H
-
- + #ifndef _COMPILER_H
- #include <compiler.h>
- + #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 154,160 ****
- void *caps; /* pointer to capslock keys */
- } _KEYTAB;
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 156,162 ----
- void *caps; /* pointer to capslock keys */
- } _KEYTAB;
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.7 1991/04/12 18:54:17
- --- param.h 1992/06/03 15:27:03
- ***************
- *** 1,15 ****
- - /*
- - * Cross Development System for Atari ST
- - * Copyright (c) 1988, Memorial University of Newfoundland
- - *
- - */
- #ifndef _PARAM_H
- #define _PARAM_H
-
- #define MAXPATHLEN 128 /* same as FILENAME_MAX in stdio.h */
- ! #define NOFILE 20 /* max. number of open files/proc */
- ! #define NCARGS 126 /* max number of chars in argv */
-
- ! #define HZ 60 /* ticks/second reported by times() */
-
- #endif /* _PARAM_H */
- --- 1,15 ----
- #ifndef _PARAM_H
- #define _PARAM_H
-
- #define MAXPATHLEN 128 /* same as FILENAME_MAX in stdio.h */
- ! #define NOFILE 20 /* same as OPEN_MAX in limits.h */
-
- ! #ifdef __MINT__
- ! # define HZ 200 /* ticks/second reported by times() */
- ! # define NCARGS 1024 /* actually, we don't limit this */
- ! #else
- ! # define HZ 60 /* ticks/second reported by times() */
- ! # define NCARGS 126 /* max. no. of characters in argv */
- ! #endif
-
- #endif /* _PARAM_H */
- *** 1.8 1991/06/20 02:21:30
- --- process.h 1992/06/03 15:27:03
- ***************
- *** 3,21 ****
- #ifndef _PROCESS_H
- #define _PROCESS_H
-
- ! #if defined(__cplusplus)
- ! extern "C" {
- #endif
-
-
- #define P_WAIT 0
- #define P_NOWAIT 1
- #define P_OVERLAY 2
-
- - #ifndef _COMPILER_H
- - #include <compiler.h>
- - #endif
- -
- __EXTERN int spawnv __PROTO((int, char *, char **));
- __EXTERN int spawnve __PROTO((int, char *, char **, char **));
- __EXTERN int _spawnve __PROTO((int, char *, char **, char **));
- --- 3,20 ----
- #ifndef _PROCESS_H
- #define _PROCESS_H
-
- ! #ifndef _COMPILER_H
- ! #include <compiler.h>
- #endif
-
- + #ifdef __cplusplus
- + extern "C" {
- + #endif
-
- #define P_WAIT 0
- #define P_NOWAIT 1
- #define P_OVERLAY 2
-
- __EXTERN int spawnv __PROTO((int, char *, char **));
- __EXTERN int spawnve __PROTO((int, char *, char **, char **));
- __EXTERN int _spawnve __PROTO((int, char *, char **, char **));
- ***************
- *** 24,30 ****
- __EXTERN int spawnl __PROTO((int, char *, ...));
- __EXTERN int spawnlp __PROTO((int, char *, ...));
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 23,29 ----
- __EXTERN int spawnl __PROTO((int, char *, ...));
- __EXTERN int spawnlp __PROTO((int, char *, ...));
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.9 1992/01/29 21:08:08
- --- pwd.h 1992/06/03 15:27:03
- ***************
- *** 10,16 ****
- #include <types.h>
- #endif
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 10,16 ----
- #include <types.h>
- #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 27,42 ****
- #define pw_comment pw_gecos
-
- __EXTERN struct passwd *getpwent __PROTO((void));
- - __EXTERN struct passwd *getpwuid __PROTO((uid_t));
- __EXTERN struct passwd *getpwnam __PROTO((const char *));
-
- #ifndef _POSIX_SOURCE
- __EXTERN void setpwfile __PROTO((char *));
- ! __EXTERN int setpwent __PROTO((void));
- ! __EXTERN int endpwent __PROTO((void));
- #endif
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 27,42 ----
- #define pw_comment pw_gecos
-
- __EXTERN struct passwd *getpwent __PROTO((void));
- __EXTERN struct passwd *getpwnam __PROTO((const char *));
-
- #ifndef _POSIX_SOURCE
- __EXTERN void setpwfile __PROTO((char *));
- ! __EXTERN struct passwd *getpwuid __PROTO((int));
- ! __EXTERN void setpwent __PROTO((void));
- ! __EXTERN void endpwent __PROTO((void));
- #endif
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.4 1991/06/20 02:21:30
- --- regexp.h 1992/06/03 15:27:03
- ***************
- *** 7,13 ****
- #include <compiler.h>
- #endif
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 7,13 ----
- #include <compiler.h>
- #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 30,36 ****
- __EXTERN void regerror __PROTO((char *_message));
- __EXTERN void regdump __PROTO((regexp *r));
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 30,36 ----
- __EXTERN void regerror __PROTO((char *_message));
- __EXTERN void regdump __PROTO((regexp *r));
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.5 1991/06/20 02:21:30
- --- resource.h 1992/06/03 15:27:04
- ***************
- *** 1,13 ****
- #ifndef _RESOURCE_H
- #define _RESOURCE_H
-
- ! #ifdef __MINT__
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- -
- #define RLIM_INFINITY 0x7fffffffL
-
- #define RLIMIT_CPU 1 /* max cpu time allowed */
- --- 1,14 ----
- #ifndef _RESOURCE_H
- #define _RESOURCE_H
-
- ! #ifndef _COMPILER_H
- ! #include <compiler.h>
- ! #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- #define RLIM_INFINITY 0x7fffffffL
-
- #define RLIMIT_CPU 1 /* max cpu time allowed */
- ***************
- *** 33,38 ****
- --- 34,40 ----
-
- struct rlimit {
- long rlim_cur;
- + long rlim_max;
- };
-
- __EXTERN int setrlimit __PROTO((int mode, struct rlimit *rl));
- ***************
- *** 39,47 ****
- __EXTERN int getrlimit __PROTO((int mode, struct rlimit *rl));
- __EXTERN int getrusuage __PROTO((int which, struct rusage *r));
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- - #endif /* __MINT__ */
- #endif /* _RESOURCE_H */
- --- 41,48 ----
- __EXTERN int getrlimit __PROTO((int mode, struct rlimit *rl));
- __EXTERN int getrusuage __PROTO((int which, struct rusage *r));
-
- ! #ifdef __cplusplus
- }
- #endif
-
- #endif /* _RESOURCE_H */
- *** 1.3 1991/06/20 02:21:30
- --- screen.h 1992/06/03 15:27:04
- ***************
- *** 1,7 ****
- #ifndef _SCREEN_H
- #define _SCREEN_H
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 1,7 ----
- #ifndef _SCREEN_H
- #define _SCREEN_H
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 63,69 ****
- #define SCRGETCOLOR (('S'<<8) | 3)
- #define SCRSETCOLOR (('S'<<8) | 4)
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 63,69 ----
- #define SCRGETCOLOR (('S'<<8) | 3)
- #define SCRSETCOLOR (('S'<<8) | 4)
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.12 1991/06/23 17:12:30
- --- setjmp.h 1992/06/03 15:27:04
- ***************
- *** 5,25 ****
- #include <compiler.h>
- #endif
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- - /* added one long for saving bios_stk (needed by SIGALRM) */
- typedef char * jmp_buf[14];
-
- ! __EXTERN int setjmp __PROTO((jmp_buf));
- ! __EXTERN void longjmp __PROTO((jmp_buf, int));
- ! #if !(defined(__MINT__) || defined(__cplusplus))
- __EXTERN int catch __PROTO((jmp_buf id, int (*fn )(void )));
- __EXTERN void throw __PROTO((jmp_buf id, int rv));
- #endif
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 5,27 ----
- #include <compiler.h>
- #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- typedef char * jmp_buf[14];
-
- ! __EXTERN int setjmp __PROTO((jmp_buf));
- ! __EXTERN void longjmp __PROTO((jmp_buf, int));
- !
- ! #ifndef __MINT__
- ! # ifndef __cplusplus
- __EXTERN int catch __PROTO((jmp_buf id, int (*fn )(void )));
- __EXTERN void throw __PROTO((jmp_buf id, int rv));
- + # endif
- #endif
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.5 1991/06/20 02:21:30
- --- siglist.h 1992/06/03 15:27:04
- ***************
- *** 1,14 ****
- #ifndef _SIGLIST_H
- #define _SIGLIST_H
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- extern char *sys_siglist[];
- extern char *signal_names[];
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 1,16 ----
- #ifndef _SIGLIST_H
- #define _SIGLIST_H
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- extern char *sys_siglist[];
- + #ifndef __MINT__
- extern char *signal_names[];
- + #endif
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.16 1992/04/13 15:53:11
- --- signal.h 1992/06/03 15:27:05
- ***************
- *** 1,6 ****
- #ifndef _SIGNAL_H
- #define _SIGNAL_H
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 1,11 ----
- #ifndef _SIGNAL_H
- #define _SIGNAL_H
- !
- ! #ifndef _COMPILER_H
- ! #include <compiler.h>
- ! #endif
- !
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 42,51 ****
- #define SIGUSR1 29 /* user signal 1 */
- #define SIGUSR2 30 /* user signal 2 */
-
- - #ifndef _COMPILER_H
- - #include <compiler.h>
- - #endif
- -
- typedef void (*__Sigfunc) __PROTO((int signum));
- typedef short sig_atomic_t;
-
- --- 47,52 ----
- ***************
- *** 56,71 ****
- __EXTERN __Sigfunc signal __PROTO((int sig, __Sigfunc func));
- __EXTERN int raise __PROTO((int sig));
-
- ! #if !defined(__STRICT_ANSI__) && defined(__MINT__)
- __EXTERN long sigsetmask __PROTO((long mask));
- __EXTERN long sigblock __PROTO((long mask));
-
- /* a mask for signals */
- #define sigmask(sig) (1L << (sig))
- !
- ! #endif
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 57,73 ----
- __EXTERN __Sigfunc signal __PROTO((int sig, __Sigfunc func));
- __EXTERN int raise __PROTO((int sig));
-
- ! #ifdef __MINT__
- ! # ifndef __STRICT_ANSI__
- __EXTERN long sigsetmask __PROTO((long mask));
- __EXTERN long sigblock __PROTO((long mask));
-
- /* a mask for signals */
- #define sigmask(sig) (1L << (sig))
- ! # endif
- ! #endif /* __MINT__ */
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.6 1991/06/20 02:21:30
- --- st-out.h 1992/06/03 15:27:05
- ***************
- *** 5,11 ****
- #ifndef _STAOUT_H
- #define _STAOUT_H
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 5,11 ----
- #ifndef _STAOUT_H
- #define _STAOUT_H
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 60,66 ****
- #define A_DEF 0x8000 /* defined */
- #define A_LNAM 0x0048 /* gst compat long name */
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 60,66 ----
- #define A_DEF 0x8000 /* defined */
- #define A_LNAM 0x0048 /* gst compat long name */
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.5 1991/06/20 02:21:30
- --- stab.h 1992/06/03 15:27:05
- ***************
- *** 1,7 ****
- #ifndef __GNU_STAB__
- #define __GNU_STAB__
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 1,7 ----
- #ifndef __GNU_STAB__
- #define __GNU_STAB__
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 15,21 ****
-
- #undef __define_stab
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 15,21 ----
-
- #undef __define_stab
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.13 1991/06/20 02:21:30
- --- stat.h 1992/06/03 15:27:05
- ***************
- *** 9,26 ****
- #include <types.h>
- #endif
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- struct stat {
- u_short st_mode;
- ! ino_t st_ino;
- ! dev_t st_dev;
- ! short st_rdev;
- short st_nlink;
- ! uid_t st_uid;
- ! gid_t st_gid;
- off_t st_size;
- off_t st_blksize;
- off_t st_blocks;
- --- 9,26 ----
- #include <types.h>
- #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- struct stat {
- u_short st_mode;
- ! ino_t st_ino; /* must be 32 bits */
- ! dev_t st_dev; /* must be 16 bits */
- ! short st_rdev; /* not supported by the kernel */
- short st_nlink;
- ! uid_t st_uid; /* must be 16 bits */
- ! gid_t st_gid; /* must be 16 bits */
- off_t st_size;
- off_t st_blksize;
- off_t st_blocks;
- ***************
- *** 28,49 ****
- time_t st_atime;
- time_t st_ctime;
- short st_attr;
- };
-
- #define S_IFMT 0170000
- - #define S_IFBLK 0060000
- #define S_IFCHR 0020000
- #define S_IFDIR 0040000
- #define S_IFREG 0100000
- #define S_IFIFO 0120000
- #define S_IFLNK 0160000
-
- ! #define S_ISUID 0004000
- ! #define S_ISGID 0002000
- ! #define S_ISVTX 0001000
- ! #define S_IREAD 0000400
- ! #define S_IWRITE 0000200
- ! #define S_IEXEC 0000100
-
- /* function definitions */
- __EXTERN int stat __PROTO((const char *, struct stat *));
- --- 28,68 ----
- time_t st_atime;
- time_t st_ctime;
- short st_attr;
- + #ifdef __MINT__
- + short res1; /* reserved for future kernel use */
- + long res2[2];
- + #endif
- };
-
- #define S_IFMT 0170000
- #define S_IFCHR 0020000
- #define S_IFDIR 0040000
- + #define S_IFBLK 0060000
- #define S_IFREG 0100000
- #define S_IFIFO 0120000
- + #define S_IMEM 0140000
- #define S_IFLNK 0160000
-
- ! #define S_ISUID 04000
- ! #define S_ISGID 02000
- ! #define S_ISVTX 01000
- ! /* file access modes for user, group, and other*/
- ! #define S_IRUSR 0400
- ! #define S_IWUSR 0200
- ! #define S_IXUSR 0100
- ! #define S_IRGRP 0040
- ! #define S_IWGRP 0020
- ! #define S_IXGRP 0010
- ! #define S_IROTH 0004
- ! #define S_IWOTH 0002
- ! #define S_IXOTH 0001
- !
- ! #ifndef _POSIX_SOURCE
- ! #define S_IREAD S_IRUSR
- ! #define S_IWRITE S_IWUSR
- ! #define S_IEXEC S_IXUSR
- ! #define DEV_BSIZE 1024
- ! #endif
-
- /* function definitions */
- __EXTERN int stat __PROTO((const char *, struct stat *));
- ***************
- *** 52,58 ****
- __EXTERN int lstat __PROTO((const char *, struct stat *));
- #endif
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 71,77 ----
- __EXTERN int lstat __PROTO((const char *, struct stat *));
- #endif
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.6 1991/06/20 02:21:30
- --- stdarg.h 1992/06/03 15:27:06
- ***************
- *** 31,44 ****
- #define va_start(AP, LASTARG) \
- (AP = ((char *) &(LASTARG) + __va_rounded_size (LASTARG)))
-
- - #if defined(__cplusplus)
- - extern "C" {
- - #endif
- - void va_end (va_list); /* Defined in gnulib -- not needed */
- - #if defined(__cplusplus)
- - }
- - #endif
- -
- #define va_end(AP)
-
- #define va_arg(AP, TYPE) \
- --- 31,36 ----
- *** 1.14 1992/04/13 15:53:11
- --- stddef.h 1992/06/03 15:27:06
- ***************
- *** 10,16 ****
- #include <compiler.h>
- #endif
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 10,16 ----
- #include <compiler.h>
- #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 35,41 ****
- #endif
-
- /* Offset of member MEMBER in a struct of type TYPE. */
- ! #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0L)->MEMBER)
-
- #ifndef EXIT_FAILURE
- #define EXIT_FAILURE (1) /* failure return value for exit() */
- --- 35,41 ----
- #endif
-
- /* Offset of member MEMBER in a struct of type TYPE. */
- ! #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-
- #ifndef EXIT_FAILURE
- #define EXIT_FAILURE (1) /* failure return value for exit() */
- ***************
- *** 42,48 ****
- #define EXIT_SUCCESS (0) /* success return value for exit() */
- #endif
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 42,48 ----
- #define EXIT_SUCCESS (0) /* success return value for exit() */
- #endif
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.22 1992/04/13 15:53:11
- --- stdio.h 1992/06/03 15:27:06
- ***************
- *** 11,16 ****
- --- 11,20 ----
- #include <compiler.h>
- #endif
-
- + #ifdef __cplusplus
- + extern "C" {
- + #endif
- +
- #ifndef _SIZE_T
- #define _SIZE_T __SIZE_TYPEDEF__
- typedef _SIZE_T size_t;
- ***************
- *** 25,31 ****
- #define FILENAME_MAX (128) /* maximum filename size */
-
- #ifndef NULL
- ! #define NULL ((void *)0L)
- #endif
-
- #define BUFSIZ ((size_t)1024) /* default buffer size */
- --- 29,35 ----
- #define FILENAME_MAX (128) /* maximum filename size */
-
- #ifndef NULL
- ! #define NULL __NULL
- #endif
-
- #define BUFSIZ ((size_t)1024) /* default buffer size */
- ***************
- *** 90,166 ****
- #define ferror(fp) ((fp)->_flag & _IOERR)
- #define fileno(fp) ((fp)->_file)
-
- - __EXTERN int remove __PROTO((const char *filename));
- - __EXTERN int rename __PROTO((const char *_oldname, const char *_newname));
- -
- - __EXTERN FILE *tmpfile __PROTO((void));
- - __EXTERN char *tmpnam __PROTO((char *buf));
- -
- - __EXTERN int fclose __PROTO((FILE *fp));
- - __EXTERN int fflush __PROTO((FILE *fp));
-
- ! __EXTERN FILE *fopen __PROTO((const char *filename, const char *mode));
- ! __EXTERN FILE *freopen __PROTO((const char *filename, const char *mode, FILE *fp));
-
- ! __EXTERN void setbuf __PROTO((FILE *fp, char *buf));
- ! __EXTERN int setvbuf __PROTO((FILE *fp, char *bp, int bmode, size_t size));
- !
- ! __EXTERN int fprintf __PROTO((FILE *fp, const char *fmt, ...));
- ! __EXTERN int printf __PROTO((const char *fmt, ...));
- ! __EXTERN int sprintf __PROTO((char *buf, const char *fmt, ...));
-
- ! __EXTERN int fscanf __PROTO((FILE *fp, const char *fmt, ...));
- ! __EXTERN int scanf __PROTO((const char *fmt, ...));
- ! __EXTERN int sscanf __PROTO((const char *buf, const char *fmt, ...));
-
- __EXTERN int vfprintf __PROTO((FILE *, const char *, __VA_LIST__));
- __EXTERN int vprintf __PROTO((const char *, __VA_LIST__));
- __EXTERN int vsprintf __PROTO((char *, const char *, __VA_LIST__));
-
- ! __EXTERN int vfscanf __PROTO((FILE *, const char *, __VA_LIST__));
- ! __EXTERN int vscanf __PROTO((const char *, __VA_LIST__));
- ! __EXTERN int vsscanf __PROTO((const char *, const char *, __VA_LIST__));
- !
- ! __EXTERN int fgetc __PROTO((FILE *fp));
- ! __EXTERN char *fgets __PROTO((char *data, int limit, FILE *fp));
- ! __EXTERN char *gets __PROTO((char *data));
- !
- ! __EXTERN int fputc __PROTO((int c, FILE *fp));
- ! __EXTERN int fputs __PROTO((const char *data, FILE *fp));
- ! __EXTERN int puts __PROTO((const char *data));
- ! __EXTERN int fungetc __PROTO((int c, FILE *fp));
- !
- ! __EXTERN size_t fread __PROTO((void *data, size_t size, size_t count, FILE *fp));
- ! __EXTERN size_t fwrite __PROTO((const void *data, size_t size, size_t count, FILE *fp));
- !
- ! __EXTERN int fgetpos __PROTO((FILE *fp, fpos_t *pos));
- ! __EXTERN int fsetpos __PROTO((FILE *fp, fpos_t *pos));
- !
- ! __EXTERN long ftell __PROTO((FILE *fp));
- ! __EXTERN void rewind __PROTO((FILE *fp));
- ! __EXTERN int fseek __PROTO((FILE *fp, long offset, int origin));
-
- ! __EXTERN void perror __PROTO((const char *msg));
-
- #ifndef __STRICT_ANSI__
- ! __EXTERN FILE *fdopen __PROTO((int h, const char *mode));
- ! __EXTERN FILE *popen __PROTO((const char *command, const char *type));
- ! __EXTERN int pclose __PROTO((FILE *fp));
- ! # ifndef _POSIX_SOURCE
- ! __EXTERN void _binmode __PROTO((int force));
- ! __EXTERN long getl __PROTO((FILE *fp));
- ! __EXTERN long putl __PROTO((long n, FILE *fp));
-
- ! __EXTERN short getw __PROTO((FILE *fp));
- ! __EXTERN short putw __PROTO((short n, FILE *fp));
- # endif
- #endif /* __STRICT_ANSI__ */
-
- /* aliases */
-
- __EXTERN int _filbuf __PROTO((FILE *)); /* needed for getc */
-
- ! #if defined(__GNUC__) && !defined(__NO_INLINE__)
- #define getc(__fp) \
- ({ int __c; \
- typedef _tfp = (__fp); \
- --- 94,175 ----
- #define ferror(fp) ((fp)->_flag & _IOERR)
- #define fileno(fp) ((fp)->_file)
-
-
- ! /* function definitions */
-
- ! __EXTERN int remove __PROTO((const char *));
- ! __EXTERN int rename __PROTO((const char *, const char *));
- ! __EXTERN char * tmpnam __PROTO((char *));
- ! __EXTERN FILE * tmpfile __PROTO((void));
- !
- ! __EXTERN int fclose __PROTO((FILE *));
- ! __EXTERN int fflush __PROTO((FILE *));
- !
- ! __EXTERN FILE * fopen __PROTO((const char *, const char *));
- ! __EXTERN FILE * freopen __PROTO((const char *, const char *, FILE *));
- !
- ! __EXTERN void setbuf __PROTO((FILE *, char *));
- ! __EXTERN int setvbuf __PROTO((FILE *, char *, int, size_t));
- !
- ! #ifdef __SRC__
- ! __EXTERN int fscanf __PROTO((FILE *, const char *, char *));
- ! __EXTERN int scanf __PROTO((const char *, char *));
- ! __EXTERN int sscanf __PROTO((const char *, const char *, int));
- ! #else
- ! __EXTERN int fscanf __PROTO((FILE *, const char *, ...));
- ! __EXTERN int scanf __PROTO((const char *, ...));
- ! __EXTERN int sscanf __PROTO((const char *, const char *, ...));
- ! #endif
-
- ! __EXTERN int fprintf __PROTO((FILE *, const char *, ...));
- ! __EXTERN int printf __PROTO((const char *, ...));
- ! __EXTERN int sprintf __PROTO((char *, const char *, ...));
-
- __EXTERN int vfprintf __PROTO((FILE *, const char *, __VA_LIST__));
- __EXTERN int vprintf __PROTO((const char *, __VA_LIST__));
- __EXTERN int vsprintf __PROTO((char *, const char *, __VA_LIST__));
-
- ! __EXTERN int fgetc __PROTO((FILE *));
- ! __EXTERN char *fgets __PROTO((char *, int, FILE *));
- ! __EXTERN char *gets __PROTO((char *));
- ! __EXTERN int fputc __PROTO((int c, FILE *));
- ! __EXTERN int fputs __PROTO((const char *, FILE *));
- ! __EXTERN int puts __PROTO((const char *));
- ! __EXTERN int fungetc __PROTO((int, FILE *));
- !
- ! __EXTERN size_t fread __PROTO((void *, size_t, size_t, FILE *));
- ! __EXTERN size_t fwrite __PROTO((const void *, size_t, size_t, FILE *));
- !
- ! __EXTERN int fgetpos __PROTO((FILE *, fpos_t *));
- ! __EXTERN int fsetpos __PROTO((FILE *, fpos_t *));
- !
- ! __EXTERN int fseek __PROTO((FILE *, long, int));
- ! __EXTERN long ftell __PROTO((FILE *));
- ! __EXTERN void rewind __PROTO((FILE *));
-
- ! __EXTERN void perror __PROTO((const char *));
-
- #ifndef __STRICT_ANSI__
- ! __EXTERN FILE *fdopen __PROTO((int, const char *));
- ! __EXTERN FILE *popen __PROTO((const char *, const char *));
- ! __EXTERN int pclose __PROTO((FILE *));
-
- ! # ifndef _POSIX_SOURCE
- ! __EXTERN void _binmode __PROTO((int)); /* ++jrb */
- ! __EXTERN long getl __PROTO((FILE *));
- ! __EXTERN long putl __PROTO((long, FILE *));
- ! __EXTERN short getw __PROTO((FILE *));
- ! __EXTERN short putw __PROTO((short, FILE *));
- # endif
- +
- #endif /* __STRICT_ANSI__ */
-
- +
- /* aliases */
-
- __EXTERN int _filbuf __PROTO((FILE *)); /* needed for getc */
-
- ! #ifdef __GNUC_INLINE__
- #define getc(__fp) \
- ({ int __c; \
- typedef _tfp = (__fp); \
- ***************
- *** 179,183 ****
- --- 188,196 ----
- #define getchar() getc(stdin)
- #define ungetchar(c) fungetc((c),stdin)
- #define putchar(c) fputc((c),stdout)
- +
- + #ifdef __cplusplus
- + }
- + #endif
-
- #endif /* _STDIO_H */
- *** 1.18 1992/03/22 22:05:23
- --- stdlib.h 1992/06/03 15:27:07
- ***************
- *** 9,15 ****
- #include <compiler.h>
- #endif
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 9,15 ----
- #include <compiler.h>
- #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 92,98 ****
- __EXTERN div_t div __PROTO((int num, int denom));
- __EXTERN ldiv_t ldiv __PROTO((long num, long denom));
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 92,98 ----
- __EXTERN div_t div __PROTO((int num, int denom));
- __EXTERN ldiv_t ldiv __PROTO((long num, long denom));
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.20 1992/04/13 15:53:11
- --- string.h 1992/06/03 15:27:07
- ***************
- *** 8,14 ****
- #include <compiler.h>
- #endif
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 8,14 ----
- #include <compiler.h>
- #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 67,85 ****
- __EXTERN void bcopy __PROTO((const void *src, void *dst, size_t length));
- __EXTERN int bcmp __PROTO((const void *src, const void *dst, size_t n));
- __EXTERN void bzero __PROTO((void *b, size_t n));
- - #ifdef __MSHORT__
- - __EXTERN void lbcopy __PROTO((const void *src, void *dst, size_t length));
- - __EXTERN int lbcmp __PROTO((const void *s1, const void *s2, size_t length));
- - __EXTERN void lbzero __PROTO((void *dst, size_t length));
- - #endif /* __MSHORT__ */
- - #endif /* __STRICT_ANSI__ */
-
- ! #ifndef __STRICT_ANSI__
- ! #ifndef __MSHORT__
- ! #define lbcopy bcopy
- ! #define lbcmp bcmp
- ! #define lbzero bzero
- ! #endif /* __MSHORT__ */
- #endif /* __STRICT_ANSI__ */
-
- /* some macro versions of functions. these are faster, but less
- --- 67,77 ----
- __EXTERN void bcopy __PROTO((const void *src, void *dst, size_t length));
- __EXTERN int bcmp __PROTO((const void *src, const void *dst, size_t n));
- __EXTERN void bzero __PROTO((void *b, size_t n));
-
- ! __EXTERN void _bcopy __PROTO((const void *src, void *dst, unsigned long length));
- ! __EXTERN int _bcmp __PROTO((const void *s1, const void *s2, unsigned long length));
- ! __EXTERN void _bzero __PROTO((void *dst, unsigned long length));
- !
- #endif /* __STRICT_ANSI__ */
-
- /* some macro versions of functions. these are faster, but less
- ***************
- *** 87,93 ****
- just #undef the appropriate things.
- */
-
- ! #if defined(__GNUC__) && !defined(__NO_INLINE__) && !defined(__cplusplus)
-
- static __inline__
- char *
- --- 79,86 ----
- just #undef the appropriate things.
- */
-
- ! #ifdef __GNUC_INLINE__
- ! # ifndef __cplusplus
-
- static __inline__
- char *
- ***************
- *** 122,130 ****
- #define strcpy __strcpy
- #define strlen __strlen
-
- ! #endif /* __GNU__ && !__NO_INLINE__ &&!__cplusplus */
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 115,124 ----
- #define strcpy __strcpy
- #define strlen __strlen
-
- ! # endif /* !__cplusplus */
- ! #endif /* __GNUC_INLINE__ */
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.12 1991/06/20 02:21:30
- --- support.h 1992/06/03 15:27:07
- ***************
- *** 12,18 ****
-
- #include <time.h> /* for time_t */
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 12,18 ----
-
- #include <time.h> /* for time_t */
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 72,78 ****
- __EXTERN int symlink __PROTO((char *old, char *new));
- __EXTERN int readlink __PROTO((char *filename, char *linkto, int siz));
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 72,78 ----
- __EXTERN int symlink __PROTO((char *old, char *new));
- __EXTERN int readlink __PROTO((char *filename, char *linkto, int siz));
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.11 1992/04/06 20:12:56
- --- sysvars.h 1992/06/03 15:27:07
- ***************
- *** 8,14 ****
- #ifndef _SYSVARS_H
- #define _SYSVARS_H
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 8,18 ----
- #ifndef _SYSVARS_H
- #define _SYSVARS_H
-
- ! #ifndef _COMPILER_H
- ! #include <compiler.h>
- ! #endif
- !
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 99,105 ****
- {
- unsigned short os_entry; /* 0x00 BRA to reset handler */
- unsigned short os_version; /* 0x02 TOS version */
- ! void (*reseth)(void); /* 0x04 -> reset handler */
- struct _osheader *os_beg; /* 0x08 -> base of OS */
- void *os_end; /* 0x0c -> end of OS ram usage */
- char *os_rsv1; /* 0x10 reserved */
- --- 103,109 ----
- {
- unsigned short os_entry; /* 0x00 BRA to reset handler */
- unsigned short os_version; /* 0x02 TOS version */
- ! void (*reseth) __PROTO((void)); /* 0x04 -> reset handler */
- struct _osheader *os_beg; /* 0x08 -> base of OS */
- void *os_end; /* 0x0c -> end of OS ram usage */
- char *os_rsv1; /* 0x10 reserved */
- ***************
- *** 116,130 ****
-
- /* zzzz to-do more */
-
- - #ifndef _COMPILER_H
- - #include <compiler.h>
- - #endif
- -
- __EXTERN long get_sysvar __PROTO((void *var));
- __EXTERN void set_sysvar_to_long __PROTO((void *var, long val));
-
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 120,130 ----
-
- /* zzzz to-do more */
-
- __EXTERN long get_sysvar __PROTO((void *var));
- __EXTERN void set_sysvar_to_long __PROTO((void *var, long val));
-
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.5 1991/06/20 02:21:30
- --- tchars.h 1992/06/03 15:27:08
- ***************
- *** 8,14 ****
- #ifndef _TCHARS_H
- #define _TCHARS_H
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 8,14 ----
- #ifndef _TCHARS_H
- #define _TCHARS_H
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 46,52 ****
- extern char __tchars[];
- #endif
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 46,52 ----
- extern char __tchars[];
- #endif
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.2 1991/06/20 02:22:10
- --- termcap.h 1992/06/03 15:27:08
- ***************
- *** 5,11 ****
- # include <compiler.h>
- #endif
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 5,11 ----
- # include <compiler.h>
- #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 27,34 ****
- /* tputs.c */
- __EXTERN void tputs __PROTO((char *cp, int affcnt, int (*outc)(int )));
-
- ! #if defined(__cplusplus)
- ! }
- #endif
-
- #endif /* _TERMCAP_H */
- --- 27,34 ----
- /* tputs.c */
- __EXTERN void tputs __PROTO((char *cp, int affcnt, int (*outc)(int )));
-
- ! #ifdef __cplusplus
- ! extern "C" {
- #endif
-
- #endif /* _TERMCAP_H */
- *** 1.15 1991/12/26 16:23:20
- --- time.h 1992/06/03 15:27:08
- ***************
- *** 10,16 ****
- #include <compiler.h>
- #endif
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 10,16 ----
- #include <compiler.h>
- #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 82,88 ****
- ((tva)->tv_sec == (tvb)->tv_sec && (tva)->tv_usec op (tvb)->tv_usec))
- #endif
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 82,88 ----
- ((tva)->tv_sec == (tvb)->tv_sec && (tva)->tv_usec op (tvb)->tv_usec))
- #endif
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.10 1991/06/20 02:21:30
- --- times.h 1992/06/03 15:27:08
- ***************
- *** 7,13 ****
- #include <compiler.h>
- #endif
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 7,13 ----
- #include <compiler.h>
- #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 26,32 ****
-
- __EXTERN int times __PROTO((struct tms *));
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 26,32 ----
-
- __EXTERN int times __PROTO((struct tms *));
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.13 1991/12/26 16:23:20
- --- types.h 1992/06/03 15:27:09
- ***************
- *** 5,11 ****
- #include <compiler.h>
- #endif
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 5,11 ----
- #include <compiler.h>
- #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 25,37 ****
- typedef unsigned short u_short;
- typedef unsigned long u_long;
-
- ! typedef u_short dev_t; /* holds a device type */
- #define major(dev) (((dev)&0xff00)>>8)
- #define minor(dev) ((dev)&0x00ff)
-
- typedef u_long ino_t; /* holds an inode (fake under GEMDOS) */
- ! typedef u_short uid_t; /* user id type */
- ! typedef u_short gid_t; /* group id type */
- typedef void * caddr_t;
-
- struct utimbuf { /* type for times() call */
- --- 25,38 ----
- typedef unsigned short u_short;
- typedef unsigned long u_long;
-
- ! typedef unsigned short dev_t; /* holds a device type */
- #define major(dev) (((dev)&0xff00)>>8)
- #define minor(dev) ((dev)&0x00ff)
-
- typedef u_long ino_t; /* holds an inode (fake under GEMDOS) */
- ! typedef _UID_T uid_t; /* user id type */
- ! typedef _GID_T gid_t; /* group id type */
- ! typedef _PID_T pid_t; /* process id type */
- typedef void * caddr_t;
-
- struct utimbuf { /* type for times() call */
- ***************
- *** 39,45 ****
- time_t modtime;
- };
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 40,46 ----
- time_t modtime;
- };
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.10 1992/04/19 16:16:24
- --- unistd.h 1992/06/03 15:27:09
- ***************
- *** 1,14 ****
- #ifndef _UNISTD_H
- #define _UNISTD_H
-
- ! #include <time.h>
- ! #include <types.h>
- !
- #ifndef _COMPILER_H
- #include <compiler.h>
- #endif
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 1,17 ----
- #ifndef _UNISTD_H
- #define _UNISTD_H
-
- ! /* NOTE:
- ! * in prototypes used here, do *not* use things
- ! * like size_t, uid_t, etc., since these
- ! * may not be defined. Use the macros
- ! * from <compiler.h> instead.
- ! */
- #ifndef _COMPILER_H
- #include <compiler.h>
- #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 37,45 ****
- #if 0
- #define _POSIX_VERSION 0L /* <- NON-CONFORMING */
- #endif
- ! #define _POSIX_CHOWN_RESTRICTED 0 /* doesn't matter anyways */
- #define _POSIX_NO_TRUNC -1
- ! #define _POSIX_VDISABLE 0
-
- /* 1003.1 section 8.2.1.2 */
- #define STDIN_FILENO 0
- --- 40,51 ----
- #if 0
- #define _POSIX_VERSION 0L /* <- NON-CONFORMING */
- #endif
- ! #define _POSIX_CHOWN_RESTRICTED 0
- ! #define _POSIX_VDISABLE 0
- !
- ! #if 0 /* this depends on the file system */
- #define _POSIX_NO_TRUNC -1
- ! #endif
-
- /* 1003.1 section 8.2.1.2 */
- #define STDIN_FILENO 0
- ***************
- *** 46,126 ****
- #define STDOUT_FILENO 1
- #define STDERR_FILENO 2
-
- #ifdef __MINT__
- ! /* flock() commands */
- # define F_ULOCK 0 /* unlock */
- # define F_LOCK 1 /* lock */
- # define F_TLOCK 2 /* test and lock (non-blocking) */
- # define F_TEST 3 /* test */
- ! __EXTERN int lockf __PROTO((int, int, long));
- #endif
-
- ! __EXTERN __EXITING _exit __PROTO((int));
- ! __EXTERN int access __PROTO((const char *, int));
- ! __EXTERN int chdir __PROTO((const char *));
- ! __EXTERN int chmod __PROTO((const char *, int));
- ! __EXTERN int chown __PROTO((const char *, int, int));
- ! __EXTERN int close __PROTO((int));
- ! __EXTERN int creat __PROTO((const char *, unsigned));
- ! __EXTERN int dup __PROTO((int));
- ! __EXTERN int dup2 __PROTO((int, int));
- ! __EXTERN int endpwent __PROTO((void));
- ! __EXTERN char *getcwd __PROTO((char *, int));
- ! __EXTERN char *getwd __PROTO((char *));
- ! __EXTERN gid_t getegid __PROTO((void));
- ! __EXTERN char *getenv __PROTO((const char *));
- ! __EXTERN int putenv __PROTO((char *));
- ! __EXTERN uid_t geteuid __PROTO((void));
- ! __EXTERN gid_t getgid __PROTO((void));
- ! __EXTERN char *getlogin __PROTO((void));
- ! __EXTERN int getopt __PROTO((int, char * const *, const char *));
- ! __EXTERN int getpgrp __PROTO((void));
- ! __EXTERN int getppid __PROTO((void));
- ! __EXTERN int getpid __PROTO((void));
- ! __EXTERN uid_t getuid __PROTO((void));
- ! __EXTERN int isatty __PROTO((int));
- ! __EXTERN int kill __PROTO((int, int));
- ! __EXTERN void *lsbrk __PROTO((long));
- ! __EXTERN long lseek __PROTO((int, long, int));
- ! __EXTERN int mkdir __PROTO((const char *, int));
- ! __EXTERN char *mktemp __PROTO((char *)); /* be careful with this and Gcc, */
- ! /* where strings are really constants */
- ! __EXTERN int open __PROTO((const char *, int, ...));
- ! __EXTERN void psignal __PROTO((int, const char *));
- ! __EXTERN int rmdir __PROTO((const char *));
- ! __EXTERN void srandom __PROTO((unsigned int seed));
- ! __EXTERN char *initstate __PROTO(( unsigned int seed, char *arg_state, int n ));
- ! __EXTERN char *setstate __PROTO((char *arg_state));
- ! __EXTERN long random __PROTO((void));
- ! __EXTERN int read __PROTO((int, void *, unsigned int));
- ! __EXTERN long _read __PROTO((int, void *, unsigned long));
- #define lread _read /* backwards compatibility, likely to go away */
- - __EXTERN void *sbrk __PROTO((size_t));
- #ifndef __SRC__
- __EXTERN void setlinebuf __PROTO((void *)); /* avoid pulling in stdio here */
- #else
- __EXTERN void setlinebuf __PROTO((FILE *)); /* stdio included in src */
- #endif
-
- ! __EXTERN gid_t setegid __PROTO((int));
- ! __EXTERN gid_t setgid __PROTO((int));
- ! __EXTERN int setpgrp __PROTO((void));
- __EXTERN int setpwent __PROTO((void));
- __EXTERN void setpwfile __PROTO((char *));
- ! __EXTERN uid_t seteuid __PROTO((int));
- ! __EXTERN uid_t setuid __PROTO((int));
- ! __EXTERN void sleep __PROTO((unsigned int));
- ! __EXTERN int stime __PROTO((long *));
- ! __EXTERN long tell __PROTO((int));
- ! __EXTERN int umask __PROTO((int));
- ! __EXTERN int unlink __PROTO((const char *));
- ! __EXTERN void usleep __PROTO((unsigned long));
- ! __EXTERN int utime __PROTO((const char *, const struct utimbuf *));
- ! __EXTERN int write __PROTO((int, const void *, unsigned int));
- ! __EXTERN long _write __PROTO((int, const void *, unsigned long));
- ! #define lwrite _write /* backwards compatibility, likely go away */
- ! __EXTERN int system __PROTO((const char *cmd));
- ! __EXTERN char *getpass __PROTO((const char *prompt));
-
- #if defined(__cplusplus)
- }
- --- 52,183 ----
- #define STDOUT_FILENO 1
- #define STDERR_FILENO 2
-
- + /* sysconf() values */
- + #define _SC_LAST -1 /* max limit # for sysconf - NOT POSIX */
- + #define _SC_MEMR_MAX 0 /* memory regions per process - NOT POSIX */
- + #define _SC_ARG_MAX 1 /* max length of cmdln - NOT quite POSIX */
- + #define _SC_OPEN_MAX 2 /* max # of open files per process - POSIX */
- + #define _SC_NGROUPS_MAX 3 /* max # supp gids - POSIX */
- + #define _SC_CHILD_MAX 4 /* max # processes/user - NOT quite POSIX */
- +
- + /* pathconf() values */
- + #define _PC_LAST -1 /* max limit # for pathconf - POSIX (!?) */
- + #define _PC_IOPEN_MAX 0 /* internal limit on open files - NOT POSIX */
- + #define _PC_LINK_MAX 1 /* max # of links - POSIX */
- + #define _PC_PATH_MAX 2 /* max len of a full pathname - POSIX */
- + #define _PC_NAME_MAX 3 /* max len of individual name - POSIX */
- + #define _PC_PIPE_BUF 4 /* bytes written atomically to fifo - POSIX */
- + #define _PC_NO_TRUNC 5 /* filename truncation - POSIX */
- +
- #ifdef __MINT__
- ! # ifndef _POSIX_SOURCE
- ! /* flock() commands */
- # define F_ULOCK 0 /* unlock */
- # define F_LOCK 1 /* lock */
- # define F_TLOCK 2 /* test and lock (non-blocking) */
- # define F_TEST 3 /* test */
- ! __EXTERN int lockf __PROTO((int, int, long));
- ! # endif
- ! #endif /* __MINT__ */
- !
- ! __EXTERN __EXITING _exit __PROTO((int));
- ! __EXTERN __EXITING abort __PROTO((void));
- ! __EXTERN int access __PROTO((const char *, int));
- ! __EXTERN int alarm __PROTO((unsigned));
- ! __EXTERN int chdir __PROTO((const char *));
- ! __EXTERN int chmod __PROTO((const char *, int));
- ! __EXTERN int chown __PROTO((const char *, int, int));
- ! __EXTERN int close __PROTO((int));
- ! __EXTERN int creat __PROTO((const char *, unsigned));
- ! __EXTERN int dup __PROTO((int));
- ! __EXTERN int dup2 __PROTO((int, int));
- ! __EXTERN int fork __PROTO((void));
- ! __EXTERN char * getcwd __PROTO((char *, int));
- ! __EXTERN char * getwd __PROTO((char *));
- ! __EXTERN _GID_T getegid __PROTO((void));
- ! __EXTERN _UID_T geteuid __PROTO((void));
- ! __EXTERN _GID_T getgid __PROTO((void));
- ! __EXTERN char * getlogin __PROTO((void));
- ! #ifdef __MINT__
- ! __EXTERN int getopt __PROTO((int, char **, const char *));
- ! #else
- ! __EXTERN int getopt __PROTO((int, char * const *, const char *));
- #endif
- + __EXTERN int getpgrp __PROTO((void));
- + __EXTERN int getpid __PROTO((void));
- + __EXTERN int getppid __PROTO((void));
- + __EXTERN _UID_T getuid __PROTO((void));
- + __EXTERN int isatty __PROTO((int));
- + __EXTERN int kill __PROTO((int, int));
- + __EXTERN long lseek __PROTO((int, long, int));
- + __EXTERN int mkdir __PROTO((const char *, unsigned));
-
- ! /* be careful with this and Gcc, where strings are really constants */
- ! __EXTERN char * mktemp __PROTO((char *));
- !
- ! #ifndef __SRC__
- ! __EXTERN int open __PROTO((const char *, int, ...));
- ! #else
- ! __EXTERN int open __PROTO((const char *, int, unsigned));
- ! #endif
- ! __EXTERN int pipe __PROTO((int *));
- ! __EXTERN long pathconf __PROTO((const char *, int));
- ! __EXTERN void psignal __PROTO((int, const char *));
- ! __EXTERN int rmdir __PROTO((const char *));
- ! __EXTERN int read __PROTO((int, void *, unsigned));
- ! __EXTERN long _read __PROTO((int, void *, unsigned long));
- ! #ifndef __MINT__
- #define lread _read /* backwards compatibility, likely to go away */
- #ifndef __SRC__
- __EXTERN void setlinebuf __PROTO((void *)); /* avoid pulling in stdio here */
- #else
- __EXTERN void setlinebuf __PROTO((FILE *)); /* stdio included in src */
- #endif
- + #endif
-
- !
- ! __EXTERN int setgid __PROTO((int));
- ! __EXTERN int setuid __PROTO((int));
- ! __EXTERN int setegid __PROTO((int));
- ! __EXTERN int seteuid __PROTO((int));
- ! __EXTERN int setregid __PROTO((int, int));
- ! __EXTERN int setreuid __PROTO((int, int));
- !
- ! __EXTERN int setpgrp __PROTO((int, int));
- ! __EXTERN void sleep __PROTO((unsigned int));
- ! __EXTERN int stime __PROTO((long *));
- ! __EXTERN long sysconf __PROTO((int));
- ! __EXTERN long tell __PROTO((int));
- ! __EXTERN char * ttyname __PROTO((int));
- ! __EXTERN int umask __PROTO((int));
- ! __EXTERN int unlink __PROTO((const char *));
- ! __EXTERN int write __PROTO((int, const void *, unsigned));
- ! __EXTERN long _write __PROTO((int, const void *, unsigned long));
- ! __EXTERN int system __PROTO((const char *cmd));
- ! __EXTERN char *getpass __PROTO((const char *prompt));
- !
- ! __EXTERN void *lsbrk __PROTO((long)); /* these are too important not to list */
- ! __EXTERN void *sbrk __PROTO((__SIZE_TYPEDEF__));
- ! __EXTERN void *_sbrk __PROTO((long));
- !
- ! #ifndef __MINT__
- ! #define lwrite _write /* backwards compatibility, likely go away */
- ! #endif
- !
- ! #ifndef _POSIX_SOURCE
- ! __EXTERN int vfork __PROTO((void));
- ! __EXTERN void srandom __PROTO((unsigned int seed));
- ! __EXTERN char * initstate __PROTO(( unsigned int seed, char *arg_state, int n ));
- ! __EXTERN char * setstate __PROTO((char *arg_state));
- ! __EXTERN long random __PROTO((void));
- ! __EXTERN void usleep __PROTO((unsigned long));
- ! #endif
- !
- ! #if 0
- ! /* see pwd.h */
- __EXTERN int setpwent __PROTO((void));
- __EXTERN void setpwfile __PROTO((char *));
- ! #endif
-
- #if defined(__cplusplus)
- }
- *** 1.9 1991/06/20 02:21:30
- --- varargs.h 1992/06/03 15:27:09
- ***************
- *** 14,20 ****
- #include <compiler.h>
- #endif
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 14,20 ----
- #include <compiler.h>
- #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 65,71 ****
-
- #endif /* __GNUC__ */
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 65,71 ----
-
- #endif /* __GNUC__ */
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.10 1992/03/22 22:05:23
- --- vdibind.h 1992/06/03 15:27:10
- ***************
- *** 5,11 ****
- # include <compiler.h>
- #endif
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 5,11 ----
- # include <compiler.h>
- #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 267,273 ****
- #define GDOS_FSM 0x5F46534DL /* '_FSM' */
- #define GDOS_FNT 0x5F464E54L /* '_FNT' */
-
- ! #if ((defined(__GNUC__)) && (!defined(__NO_INLINE__)))
- #define vq_vgdos() \
- ({ \
- register unsigned long ret __asm__("d0"); \
- --- 267,273 ----
- #define GDOS_FSM 0x5F46534DL /* '_FSM' */
- #define GDOS_FNT 0x5F464E54L /* '_FNT' */
-
- ! #ifdef __GNUC_INLINE__
- #define vq_vgdos() \
- ({ \
- register unsigned long ret __asm__("d0"); \
- ***************
- *** 424,430 ****
- __EXTERN void v_bez_off __PROTO((int handle));
- #endif /* ALTERNATE */
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 424,430 ----
- __EXTERN void v_bez_off __PROTO((int handle));
- #endif /* ALTERNATE */
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.2 1991/06/20 02:21:30
- --- wait.h 1992/06/03 15:27:10
- ***************
- *** 1,9 ****
- #ifndef _WAIT_H
- #define _WAIT_H
-
- ! #ifdef __MINT__
- !
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 1,7 ----
- #ifndef _WAIT_H
- #define _WAIT_H
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 33,45 ****
-
- #define WIFSIGNALED(x) ((x)._w.termsig != 0)
- #define WIFSTOPPED(x) ((x)._w.termsig == WSTOPPED)
-
- #define WNOHANG 1
- #define WUNTRACED 2
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- ! #endif /* __MINT__ */
- ! #endif /* _WAIT_H */
- --- 31,43 ----
-
- #define WIFSIGNALED(x) ((x)._w.termsig != 0)
- #define WIFSTOPPED(x) ((x)._w.termsig == WSTOPPED)
- + #define WIFEXITED(x) ((x)._w.termsig == 0)
-
- #define WNOHANG 1
- #define WUNTRACED 2
-
- ! #ifdef __cplusplus
- }
- #endif
-
- ! #endif
- *** 1.4 1991/06/20 02:21:30
- --- widget.h 1992/06/03 15:27:10
- ***************
- *** 27,33 ****
- #include <memory.h>
- #include <curses.h>
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 27,33 ----
- #include <memory.h>
- #include <curses.h>
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 182,188 ****
- __EXTERN WIDGET widgetinput __PROTO((void));
- __EXTERN WIDGETTYPE widgettype __PROTO((WIDGET));
-
- ! #if defined(__cplusplus)
- }
- #endif
-
- --- 182,188 ----
- __EXTERN WIDGET widgetinput __PROTO((void));
- __EXTERN WIDGETTYPE widgettype __PROTO((WIDGET));
-
- ! #ifdef __cplusplus
- }
- #endif
-
- *** 1.6 1991/12/26 16:23:20
- --- xbra.h 1992/06/03 15:27:11
- ***************
- *** 5,11 ****
- #include <compiler.h>
- #endif
-
- ! #if defined(__cplusplus)
- extern "C" {
- #endif
-
- --- 5,11 ----
- #include <compiler.h>
- #endif
-
- ! #ifdef __cplusplus
- extern "C" {
- #endif
-
- ***************
- *** 44,50 ****
- _JSR_OPCODE, \
- (void (*) __PROTO((void))) fn \
- }
- ! #if defined(__cplusplus)
- }
- #endif
- #endif /* _XBRA_H */
- --- 44,50 ----
- _JSR_OPCODE, \
- (void (*) __PROTO((void))) fn \
- }
- ! #ifdef __cplusplus
- }
- #endif
- #endif /* _XBRA_H */
-